| import os |
| import gradio as gr |
| from model import predict |
|
|
| description = """ |
| - This work is a part of the [DepthPro: Beyond Depth Estimation](https://github.com/geetu040/depthpro-beyond-depth) repository, which further explores this model's capabilities on: |
| - Image Segmentation - Human Segmentation |
| - Image Super Resolution - 384px to 1536px (4x Upscaling) |
| - Image Super Resolution - 256px to 1024px (4x Upscaling) |
| """ |
| examples_dir = "assets/examples/" |
| examples = [[os.path.join(examples_dir, filename)] for filename in os.listdir(examples_dir)] |
|
|
| interface = gr.Interface( |
| fn=predict, |
| inputs=gr.Image(type="pil"), |
| outputs=gr.Image(type="pil"), |
| title="DepthPro: Segmentation Human", |
| description=description, |
| examples=examples, |
| ) |
|
|
| if __name__ == "__main__": |
| interface.launch() |
|
|