ayoubkirouane commited on
Commit
c508ef4
·
verified ·
1 Parent(s): bfef85d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
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.outputs.Dataframe(type="pandas"),
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)