Spaces:
Sleeping
Sleeping
maxinethegreat
commited on
Commit
•
d647e93
1
Parent(s):
9330264
testing video input
Browse files
app.py
CHANGED
@@ -45,21 +45,20 @@ def predict_emotion(frame):
|
|
45 |
# cv2.destroyAllWindows()
|
46 |
|
47 |
|
48 |
-
|
49 |
-
image = gr.inputs.Video(source = "webcam" )
|
50 |
-
# label = gr.outputs.Label(num_top_classes=7)
|
51 |
|
52 |
-
|
53 |
|
54 |
|
55 |
|
56 |
iface = gr.Interface(
|
57 |
fn = predict_emotion,
|
58 |
-
inputs=
|
59 |
-
outputs=
|
60 |
# interpretation = "default",
|
61 |
title = "Mood Detective",
|
62 |
-
description = "
|
63 |
)
|
64 |
|
65 |
iface.launch()
|
|
|
45 |
# cv2.destroyAllWindows()
|
46 |
|
47 |
|
48 |
+
input_image = gr.inputs.Image(source = "webcam")
|
49 |
+
# image = gr.inputs.Video(source = "webcam" )
|
|
|
50 |
|
51 |
+
output_image = gr.inputs.Image(type = "numpy", label="Emotion Detection", shape=(300,300) )
|
52 |
|
53 |
|
54 |
|
55 |
iface = gr.Interface(
|
56 |
fn = predict_emotion,
|
57 |
+
inputs=input_image,
|
58 |
+
outputs=output_image,
|
59 |
# interpretation = "default",
|
60 |
title = "Mood Detective",
|
61 |
+
description = "Real-Time Emotion Detection"
|
62 |
)
|
63 |
|
64 |
iface.launch()
|