Npps commited on
Commit
5506e5d
·
verified ·
1 Parent(s): 77a1d92

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -30,10 +30,7 @@ def predict_emotion(image):
30
  # Define the Gradio interface
31
  interface = gr.Interface(
32
  fn=predict_emotion, # Your prediction function
33
- inputs=[
34
- gr.inputs.Image(type="pil", label="Upload Image"),
35
- gr.inputs.Image(type="pil", source="webcam", label="Capture Image")
36
- ], # Input options: upload or capture from webcam
37
  outputs="text", # Output as text displaying the predicted emotion
38
  title="Emotion Detection",
39
  description="Upload an image or capture one from your webcam to see the predicted emotion."
 
30
  # Define the Gradio interface
31
  interface = gr.Interface(
32
  fn=predict_emotion, # Your prediction function
33
+ inputs= gr.Image(type="pil", sources=[("upload","webcam")], label="Capture Image"), # Input options: upload or capture from webcam
 
 
 
34
  outputs="text", # Output as text displaying the predicted emotion
35
  title="Emotion Detection",
36
  description="Upload an image or capture one from your webcam to see the predicted emotion."