Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -30,7 +30,7 @@ def predict_emotion(image):
|
|
30 |
# Define the Gradio interface
|
31 |
interface = gr.Interface(
|
32 |
fn=predict_emotion, # Your prediction function
|
33 |
-
inputs= gr.Image(type="pil", sources=[
|
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."
|
|
|
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."
|