Jerimee commited on
Commit
e34325a
·
1 Parent(s): 976f564

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -3,8 +3,13 @@ from transformers import pipeline
3
 
4
  pipe = pipeline("sentiment-analysis")
5
 
6
- def greet(name):
7
  return pipe(text)
8
 
9
- iface = gr.Interface(fn=greet, inputs=gr.Textbox(lines=2, placeholder="Say something nice or not nice"), gr.outputs.Label(num_top_classes=3))
 
 
 
 
 
10
  iface.launch()
 
3
 
4
  pipe = pipeline("sentiment-analysis")
5
 
6
+ def senti(name):
7
  return pipe(text)
8
 
9
+ iface = gr.Interface(
10
+ fn=senti,
11
+ inputs='text',
12
+ outputs='text'
13
+ )
14
+
15
  iface.launch()