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