Jerimee commited on
Commit
d8fc4cb
β€’
1 Parent(s): 6f90531

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -6,11 +6,11 @@ pipe = pipeline("sentiment-analysis")
6
  def senti(sentiment):
7
  return pipe(text)
8
 
9
- iface = gr.Interface(
10
- fn=senti,
11
- inputs='text',
12
- outputs=[],
13
- description = 'Get Sentiment Negative/positive for the given input'
14
- )
15
-
16
- iface.launch()
 
6
  def senti(sentiment):
7
  return pipe(text)
8
 
9
+ if __name__ == "__main__":
10
+ iface = gr.Interface(
11
+ fn=senti,
12
+ inputs= gr.inputs.Textbox(lines=3, placeholder="Insert sentiment"),
13
+ description = 'Get Sentiment Negative/positive for the given input',
14
+ outputs="text"
15
+ )
16
+ iface.launch()