Spaces:
Sleeping
Sleeping
Add score to results
Browse files
app.py
CHANGED
|
@@ -5,7 +5,7 @@ pipeline = pipeline(task="text-classification", model="databoyface/distilbert-ba
|
|
| 5 |
|
| 6 |
def predict(input_txt):
|
| 7 |
predictions = pipeline(input_txt)
|
| 8 |
-
return {p["label"] for p in predictions}
|
| 9 |
|
| 10 |
gradio_app = gr.Interface(
|
| 11 |
fn=predict,
|
|
|
|
| 5 |
|
| 6 |
def predict(input_txt):
|
| 7 |
predictions = pipeline(input_txt)
|
| 8 |
+
return {p["label"]: p["score"] for p in predictions}
|
| 9 |
|
| 10 |
gradio_app = gr.Interface(
|
| 11 |
fn=predict,
|