Spaces:
Runtime error
Runtime error
Download image_caption/gradio_interface.py from rishabh-zuma/ImageSense: direct link, hf CLI and curl.
- Browser
- Download file 502 Bytes
-
https://huggingface.co/spaces/rishabh-zuma/ImageSense/resolve/main/image_caption/gradio_interface.py
- Command line
-
hf download hf://spaces/rishabh-zuma/ImageSense/image_caption/gradio_interface.py
-
curl -L -o gradio_interface.py https://huggingface.co/spaces/rishabh-zuma/ImageSense/resolve/main/image_caption/gradio_interface.py
502 Bytes
| #!/usr/bin/env python | |
| """gradio_interface.py: """ | |
| __author__ = "Rishabh Gupta" | |
| __copyright__ = "Copyright 2023, Zuma" | |
| __created_date__ = "04-08-2023" | |
| import gradio as gr | |
| from image_caption import get_caption | |
| gr.Interface(fn=get_caption.get_image_caption, | |
| inputs=gr.Image(type="pil"), | |
| outputs=gr.Label(num_top_classes=3), | |
| examples=["image_caption/examples/bathroom.jpg", "image_caption/examples/livingRoom.jpg"]).launch() | |
| if __name__ == '__main__': | |
| pass | |