Helder Rodrigues commited on
Commit
eb08918
1 Parent(s): e24aef3
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -5,7 +5,7 @@ classifier = pipeline("sentiment-analysis")
5
 
6
  def generate(text):
7
  result = classifier(text)
8
- return result
9
 
10
  examples = [
11
  ["SE is the best company in the world!"],
@@ -15,7 +15,7 @@ examples = [
15
  demo = gr.Interface(
16
  fn=generate,
17
  inputs=gr.inputs.Textbox(lines=5, label="Input Text"),
18
- outputs=gr.outputs.Textbox(label="Generated Text"),
19
  examples=examples
20
  )
21
 
 
5
 
6
  def generate(text):
7
  result = classifier(text)
8
+ return result.label
9
 
10
  examples = [
11
  ["SE is the best company in the world!"],
 
15
  demo = gr.Interface(
16
  fn=generate,
17
  inputs=gr.inputs.Textbox(lines=5, label="Input Text"),
18
+ outputs=gr.outputs.Textbox(label="Sentiment"),
19
  examples=examples
20
  )
21