ombhagwat24 commited on
Commit
e97f553
1 Parent(s): 3bb9629

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -9,6 +9,8 @@ model = AutoModelForSequenceClassification.from_pretrained(model_name)
9
 
10
  classifier = pipeline("sentiment-analysis",model=model, tokenizer=tokenizer)
11
 
12
- result=classifier(["we hope you don't hate it."],
13
- ["I like your product"])
14
-
 
 
 
9
 
10
  classifier = pipeline("sentiment-analysis",model=model, tokenizer=tokenizer)
11
 
12
+ def get_sentiment(input_text):
13
+ return classifier(input_text)
14
+
15
+ iface=gr.Interface(fn=get_sentiment, inputs="text" ,outputs=["text"], title="Sentiment Analysis",description="Get Sentiment Negative & Positive for given input")
16
+ iface.launch(inline=False)