Spaces:
Runtime error
Runtime error
ombhagwat24
commited on
Commit
•
e97f553
1
Parent(s):
3bb9629
Update app.py
Browse files
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 |
-
|
13 |
-
|
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)
|