Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ label_map = {
|
|
14 |
def respond(message, history, *args):
|
15 |
result = pipe(message)[0]
|
16 |
label = label_map.get(result["label"], result["label"]) # Map label
|
17 |
-
score = round(result["score"], 2)
|
18 |
return f"Prediction: {label} (Confidence: {score})"
|
19 |
|
20 |
# Create a simple Gradio ChatInterface with your model
|
|
|
14 |
def respond(message, history, *args):
|
15 |
result = pipe(message)[0]
|
16 |
label = label_map.get(result["label"], result["label"]) # Map label
|
17 |
+
score = round(result["score"]*100, 2)
|
18 |
return f"Prediction: {label} (Confidence: {score})"
|
19 |
|
20 |
# Create a simple Gradio ChatInterface with your model
|