Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -225,14 +225,14 @@ def classifyTimeFrame(user_input):
|
|
| 225 |
print(prediction)
|
| 226 |
predicted_label = label_mapping[prediction[0]]
|
| 227 |
|
| 228 |
-
result = f"Predicted intent: {predicted_label}\n"
|
| 229 |
print(f"Predicted intent: {predicted_label}\n")
|
| 230 |
# Print the confidence for each label
|
| 231 |
print("\nLabel Confidence Scores:")
|
| 232 |
for i, label in label_mapping.items():
|
| 233 |
confidence = probabilities[0][i].item() # Get confidence score for each label
|
| 234 |
print(f"{label}: {confidence:.4f}")
|
| 235 |
-
result += f"{label}: {confidence:.4f}"
|
| 236 |
print("\n")
|
| 237 |
return result
|
| 238 |
|
|
|
|
| 225 |
print(prediction)
|
| 226 |
predicted_label = label_mapping[prediction[0]]
|
| 227 |
|
| 228 |
+
result = f"Predicted intent: {predicted_label}\n\n"
|
| 229 |
print(f"Predicted intent: {predicted_label}\n")
|
| 230 |
# Print the confidence for each label
|
| 231 |
print("\nLabel Confidence Scores:")
|
| 232 |
for i, label in label_mapping.items():
|
| 233 |
confidence = probabilities[0][i].item() # Get confidence score for each label
|
| 234 |
print(f"{label}: {confidence:.4f}")
|
| 235 |
+
result += f"{label}: {confidence:.4f}\n"
|
| 236 |
print("\n")
|
| 237 |
return result
|
| 238 |
|