durani commited on
Commit
c571b11
1 Parent(s): b5ea312

model specified

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -2,7 +2,7 @@
2
  import gradio as gr
3
  from transformers import pipeline
4
 
5
- sentiment = pipeline ("sentiment-analysis")
6
 
7
  def get_sentiment(input_text):
8
  result = sentiment(input_text)
@@ -14,5 +14,5 @@ result
14
 
15
  iface = gr.Interface(fn = get_sentiment, inputs = "text", outputs = "text" ,title = 'Sentiment Analysis')
16
 
17
- iface.launch(inline= False)
18
 
 
2
  import gradio as gr
3
  from transformers import pipeline
4
 
5
+ sentiment = pipeline ("sentiment-analysis", model="distilbert-base-uncased-finetuned-sst-2-english")
6
 
7
  def get_sentiment(input_text):
8
  result = sentiment(input_text)
 
14
 
15
  iface = gr.Interface(fn = get_sentiment, inputs = "text", outputs = "text" ,title = 'Sentiment Analysis')
16
 
17
+ iface.launch(inline= False, share=True)
18