hussain-shk commited on
Commit
48b0ee3
1 Parent(s): 3540a4c
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -1,5 +1,5 @@
1
  from transformers import pipeline
2
- import gradio as grad
3
  roberta_pipe = pipeline(
4
  "sentiment-analysis",
5
  model="siebert/sentiment-roberta-large-english",
@@ -13,4 +13,5 @@ def analyse_sentiment(text):
13
  text = gr.inputs.Textbox(lines=5, placeholder="Enter Text to Get Sentiment",default="", label="Enter Text")
14
  text_output = gr.outputs.Textbox(type="auto", label=f"Sentiment")
15
 
16
- grad.Interface(fn=analyse_sentiment, inputs=text, outputs=text_output).launch()
 
 
1
  from transformers import pipeline
2
+ import gradio as gr
3
  roberta_pipe = pipeline(
4
  "sentiment-analysis",
5
  model="siebert/sentiment-roberta-large-english",
 
13
  text = gr.inputs.Textbox(lines=5, placeholder="Enter Text to Get Sentiment",default="", label="Enter Text")
14
  text_output = gr.outputs.Textbox(type="auto", label=f"Sentiment")
15
 
16
+ iface = gr.Interface(fn=analyse_sentiment, inputs=[text], outputs=text_output, title='Roberta Sentiment Analysis')
17
+ iface.launch(enable_queue=True)