mafoaurelie commited on
Commit
3dc3bad
1 Parent(s): 5f0a36f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -1,7 +1,9 @@
1
  import gradio as gr
 
2
  from transformers import pipeline
3
 
4
- sentiment= pipeline('sentiment-analysis')
 
5
  def get_sentiment(input_text):
6
  texte= sentiment(input_text)
7
  result=texte[0]['label']
@@ -11,4 +13,5 @@ iface=gr.Interface(title='Sentiment Analysis',
11
  fn=get_sentiment,
12
  inputs='text',
13
  outputs='text',
14
- description='Get Sentiment Negative/Positive for giving input').launch()
 
 
1
  import gradio as gr
2
+
3
  from transformers import pipeline
4
 
5
+ sentiment= pipeline("sentiment-analysis")
6
+
7
  def get_sentiment(input_text):
8
  texte= sentiment(input_text)
9
  result=texte[0]['label']
 
13
  fn=get_sentiment,
14
  inputs='text',
15
  outputs='text',
16
+ description="Get Sentiment Negative/Positive for giving input")
17
+ iface.launch()