Elbhnasy commited on
Commit
8b5bd2c
·
1 Parent(s): 64bfa89

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -56,10 +56,12 @@ article = "I will add it soon wait.."
56
 
57
  # Create examples list from "examples/" directory
58
  example_list = [["examples/" + example] for example in os.listdir("examples")]
59
-
 
 
60
  # Create the Gradio demo
61
  demo = gr.Interface(fn=predict, # mapping function from input to output
62
- inputs=gr.Image(type="pil"), # what are the inputs?
63
  outputs=[gr.Label(num_top_classes=3, label="Predictions"), # what are the outputs?
64
  gr.Number(label="Prediction time (s)")], # our fn has two outputs, therefore we have two outputs
65
  # Create examples list from "examples/" directory
 
56
 
57
  # Create examples list from "examples/" directory
58
  example_list = [["examples/" + example] for example in os.listdir("examples")]
59
+ input_1 = gr.inputs.Image(type='pil', label="upload Image", source="upload")
60
+ input_2 = gr.inputs.Image(type='pil', label="take photo", source="webcam",device_id=1)
61
+ inputs= [input_1, input_2]
62
  # Create the Gradio demo
63
  demo = gr.Interface(fn=predict, # mapping function from input to output
64
+ inputs=inputs, # what are the inputs?
65
  outputs=[gr.Label(num_top_classes=3, label="Predictions"), # what are the outputs?
66
  gr.Number(label="Prediction time (s)")], # our fn has two outputs, therefore we have two outputs
67
  # Create examples list from "examples/" directory