Spaces:
Runtime error
Runtime error
| import gradio as gr | |
| import requests | |
| from predict import image_inference,video_inference | |
| import gdown | |
| path = [['image.jpg'],] | |
| video_path = [['video_.mp4'],] | |
| # downloading vide example | |
| url = "https://drive.google.com/file/d/1reSYnmarjdmDfR1QFK3NBHzJ5q_8Kyia/view?usp=share_link" | |
| output = "video_.mp4" | |
| #gdown.download(url, output, quiet=False, fuzzy=True) | |
| inputs_image = [ | |
| gr.components.Image(type="filepath", label="Input Image"), | |
| ] | |
| outputs_image = [ | |
| gr.components.Image(type="numpy", label="Output Image"), | |
| ] | |
| image_interface = gr.Interface( | |
| fn=image_inference, | |
| inputs=inputs_image, | |
| outputs=outputs_image, | |
| title="Arab Sign Language Detection app", | |
| examples=path, | |
| cache_examples=False, | |
| ).launch() | |
| #inputs_video = [ | |
| # gr.components.Video(type='filepath',label='Input Video'), | |
| #] | |
| #outputs_video = [ | |
| # gr.components.Image(type='numpy',label='Output Video') | |
| #] | |
| #interface_video = gr.Interface( | |
| # fn=video_inference, | |
| # inputs=inputs_video, | |
| # outputs=outputs_video, | |
| # title="Arab Sign Language Detection app", | |
| # examples=video_path, | |
| # cache_examples=False, | |
| #) | |
| # | |
| #gr.TabbedInterface( | |
| # [image_interface, interface_video], | |
| # tab_names=['Image inference', 'Video inference'] | |
| #).queue().launch() |