Spaces:
Runtime error
Runtime error
ananthujay
commited on
Commit
·
2211181
1
Parent(s):
a3e4157
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
|
2 |
from transformers import pipeline
|
3 |
|
4 |
nlp = pipeline("sentiment-analysis")
|
@@ -9,5 +9,3 @@ def scoring(text):
|
|
9 |
score = results[0]['score'] # Get the sentiment score
|
10 |
return f"Sentiment: {sentiment}, Score: {score}"
|
11 |
|
12 |
-
iface = gr.Interface(fn=scoring, inputs="text", outputs="text")
|
13 |
-
iface.launch()
|
|
|
1 |
+
|
2 |
from transformers import pipeline
|
3 |
|
4 |
nlp = pipeline("sentiment-analysis")
|
|
|
9 |
score = results[0]['score'] # Get the sentiment score
|
10 |
return f"Sentiment: {sentiment}, Score: {score}"
|
11 |
|
|
|
|