Spaces:
Runtime error
Runtime error
Commit ·
4785802
1
Parent(s): e03bf74
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,8 +5,8 @@ nlp = pipeline("sentiment-analysis")
|
|
| 5 |
|
| 6 |
def scoring(text):
|
| 7 |
results = nlp(text)
|
| 8 |
-
sentiment = results[0]['label']
|
| 9 |
-
score = results[0]['score']
|
| 10 |
return f"Sentiment: {sentiment}, Score: {score}"
|
| 11 |
|
| 12 |
iface = gr.Interface(fn=scoring, inputs="text", outputs="text")
|
|
|
|
| 5 |
|
| 6 |
def scoring(text):
|
| 7 |
results = nlp(text)
|
| 8 |
+
sentiment = results[0]['label']
|
| 9 |
+
score = results[0]['score']
|
| 10 |
return f"Sentiment: {sentiment}, Score: {score}"
|
| 11 |
|
| 12 |
iface = gr.Interface(fn=scoring, inputs="text", outputs="text")
|