import numpy as np import gradio as gr from PIL import Image from yolo.model import * model = yolo_model() def predict(input_img): # input_img = Image.fromarray(input_img) _, payload = model.predict(input_img) # print('prediction',prediction) return payload css = '' # with gr.Blocks(css=css) as demo: # gr.HTML("

Signsapp: Classify the signs based on the hands sign images

") # gr.Interface(sign,inputs=gr.Image(shape=(200, 200)), outputs=gr.Label()) title = r"yolov3" description = r"""
Recognize and Detect common objects using the pytorch model
""" article = r""" ### Credits - [Coursera](https://www.coursera.org/learn/convolutional-neural-networks/) """ demo = gr.Interface( title = title, description = description, article = article, fn=predict, inputs = gr.Image(), outputs = gr.Image(), examples=["dog-cycle-car.png"] # allow_flagging = "manual", # flagging_options = ['recule', 'tournedroite', 'arretetoi', 'tournegauche', 'gauche', 'avance', 'droite'], # flagging_dir = "./flag/men" ) # demo.queue() demo.launch(debug=True)