Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,7 +5,7 @@ pipe = pipeline(task="sentiment-analysis", model="amaldevc/nlp_sentiment")
|
|
| 5 |
|
| 6 |
def predict(review):
|
| 7 |
pred = pipe.predict(review)
|
| 8 |
-
return pred[0]["label"] + " with score " + pred[0]["score"]
|
| 9 |
|
| 10 |
iface = gr.Interface(fn=predict, inputs="text", outputs="text")
|
| 11 |
iface.launch()
|
|
|
|
| 5 |
|
| 6 |
def predict(review):
|
| 7 |
pred = pipe.predict(review)
|
| 8 |
+
return pred[0]["label"] + " with score " + str(pred[0]["score"])
|
| 9 |
|
| 10 |
iface = gr.Interface(fn=predict, inputs="text", outputs="text")
|
| 11 |
iface.launch()
|