tclopess commited on
Commit
0b95675
·
verified ·
1 Parent(s): 85ee443

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -2
app.py CHANGED
@@ -7,11 +7,23 @@ pipe = pipeline('sentiment-analysis')
7
  def get_sentiment(input_text):
8
  return pipe(input_text)
9
 
 
 
 
 
 
 
 
 
 
 
 
10
  iface = gr.Interface(fn=get_sentiment,
11
- inputs='text',
12
  outputs=['text'],
13
  title='Sentiment Analysis',
14
- description='Obtenha o sentimento do texto digitado 😄|😠'
 
15
  )
16
 
17
  iface.launch(inline=False)
 
7
  def get_sentiment(input_text):
8
  return pipe(input_text)
9
 
10
+ app_examples = [
11
+ ['Não estou em minha melhor versão'],
12
+ ['Nada mais satisfatorio como chegar em casa e relaxar']
13
+ ]
14
+
15
+ inputs = [
16
+ gr.Textbox(label="Text", value=app_examples[0][0]),
17
+
18
+ ]
19
+
20
+
21
  iface = gr.Interface(fn=get_sentiment,
22
+ inputs=inputs,
23
  outputs=['text'],
24
  title='Sentiment Analysis',
25
+ description='Obtenha o sentimento do texto digitado 😄|😠',
26
+ example= app_examples
27
  )
28
 
29
  iface.launch(inline=False)