Spaces:
Running
Running
Commit
·
c0b0f1a
1
Parent(s):
00be2d8
Update app.py
Browse files
app.py
CHANGED
@@ -24,12 +24,15 @@ def what_happened1(text):
|
|
24 |
return output
|
25 |
|
26 |
def what_happened2(file_object, option_list):
|
|
|
27 |
if file_object:
|
28 |
output1 = "You uploaded a file."
|
29 |
if len(option_list) > 0:
|
30 |
output1 = output1 + "\nYou selected these options:\n- " + "\n- ".join(option_list)
|
31 |
else:
|
32 |
output1 = "You should upload a file."
|
|
|
|
|
33 |
output2 = output3 = output4 = output5 = "This option was not selected."
|
34 |
if "emotion frequencies" in option_list:
|
35 |
output2 = "This option was selected."
|
@@ -87,7 +90,8 @@ iface2 = gr.Interface(
|
|
87 |
],
|
88 |
#outputs=["text", "text", "text", "text", "text"])
|
89 |
outputs = [
|
90 |
-
gr.Textbox(label="Output file"),
|
|
|
91 |
gr.Textbox(label="Emotion frequencies"),
|
92 |
gr.Textbox(label="Emotion distribution over time"),
|
93 |
gr.Textbox(label="Peaks"),
|
|
|
24 |
return output
|
25 |
|
26 |
def what_happened2(file_object, option_list):
|
27 |
+
""""
|
28 |
if file_object:
|
29 |
output1 = "You uploaded a file."
|
30 |
if len(option_list) > 0:
|
31 |
output1 = output1 + "\nYou selected these options:\n- " + "\n- ".join(option_list)
|
32 |
else:
|
33 |
output1 = "You should upload a file."
|
34 |
+
"""
|
35 |
+
output1 = file_object
|
36 |
output2 = output3 = output4 = output5 = "This option was not selected."
|
37 |
if "emotion frequencies" in option_list:
|
38 |
output2 = "This option was selected."
|
|
|
90 |
],
|
91 |
#outputs=["text", "text", "text", "text", "text"])
|
92 |
outputs = [
|
93 |
+
#gr.Textbox(label="Output file"),
|
94 |
+
"file",
|
95 |
gr.Textbox(label="Emotion frequencies"),
|
96 |
gr.Textbox(label="Emotion distribution over time"),
|
97 |
gr.Textbox(label="Peaks"),
|