Spaces:
Runtime error
Runtime error
ayoubkirouane
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -11,18 +11,18 @@ def analyze(text):
|
|
11 |
|
12 |
return pd.DataFrame(formatted_results)
|
13 |
|
14 |
-
|
15 |
-
examples = ["Walking alone in the dark forest, he couldn't shake the feeling of fear creeping over him." ,
|
16 |
"Winning the championship brought tears of joy to the entire team."]
|
17 |
|
18 |
# Create a Gradio interface
|
19 |
iface = gr.Interface(fn=analyze,
|
20 |
inputs="text",
|
21 |
-
outputs=gr.
|
22 |
-
allow_flagging=False
|
23 |
-
examples=examples
|
24 |
-
title="BERT Emotion Analysis App"
|
25 |
description="Enter a piece of text, and this app will analyze its emotional content using a BERT-Emotions-Classifier model.",
|
26 |
)
|
|
|
27 |
# Launch the app
|
28 |
-
iface.launch(debug=True)
|
|
|
11 |
|
12 |
return pd.DataFrame(formatted_results)
|
13 |
|
14 |
+
examples = ["Walking alone in the dark forest, he couldn't shake the feeling of fear creeping over him.",
|
|
|
15 |
"Winning the championship brought tears of joy to the entire team."]
|
16 |
|
17 |
# Create a Gradio interface
|
18 |
iface = gr.Interface(fn=analyze,
|
19 |
inputs="text",
|
20 |
+
outputs=gr.Dataframe(type="pandas"),
|
21 |
+
allow_flagging=False,
|
22 |
+
examples=examples,
|
23 |
+
title="BERT Emotion Analysis App",
|
24 |
description="Enter a piece of text, and this app will analyze its emotional content using a BERT-Emotions-Classifier model.",
|
25 |
)
|
26 |
+
|
27 |
# Launch the app
|
28 |
+
iface.launch(debug=True)
|