Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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."
|