Spaces:
Running
Running
Commit
·
7ddd7f1
1
Parent(s):
243f493
Update app.py
Browse files
app.py
CHANGED
@@ -1,15 +1,12 @@
|
|
1 |
import gradio as gr
|
2 |
|
3 |
-
def greet(name):
|
4 |
-
return "Hello " + name + "!"
|
5 |
-
|
6 |
def what_happened(text, file_object, option_list):
|
7 |
if file_object:
|
8 |
output = "You uploaded a file."
|
9 |
if len(option_list) > 0:
|
10 |
output = output + "\nYou selected these options:\n- " + "\n- ".join(option_list)
|
11 |
else:
|
12 |
-
output = text
|
13 |
if len(option_list) > 0:
|
14 |
output = output + "\nYou can only select options when uploading a dataset."
|
15 |
return output
|
|
|
1 |
import gradio as gr
|
2 |
|
|
|
|
|
|
|
3 |
def what_happened(text, file_object, option_list):
|
4 |
if file_object:
|
5 |
output = "You uploaded a file."
|
6 |
if len(option_list) > 0:
|
7 |
output = output + "\nYou selected these options:\n- " + "\n- ".join(option_list)
|
8 |
else:
|
9 |
+
output = "Normally, this demo should analyse the emotions in this text:\n" + text
|
10 |
if len(option_list) > 0:
|
11 |
output = output + "\nYou can only select options when uploading a dataset."
|
12 |
return output
|