Spaces:
Runtime error
Runtime error
Preetham04
commited on
Commit
•
6510d68
1
Parent(s):
c1f16b3
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ pipeline = pipeline(task="text-classification", model="Preetham04/sentiment-anal
|
|
5 |
|
6 |
def predict(input_text):
|
7 |
predictions = pipeline(input_text)
|
8 |
-
return
|
9 |
|
10 |
gradio_app = gr.Interface(
|
11 |
predict,
|
|
|
5 |
|
6 |
def predict(input_text):
|
7 |
predictions = pipeline(input_text)
|
8 |
+
return {p["label"]: p["score"] for p in predictions}
|
9 |
|
10 |
gradio_app = gr.Interface(
|
11 |
predict,
|