final
Browse files
app.py
CHANGED
@@ -100,7 +100,8 @@ def predict_label(sentence, tokenizer, model1, model2, device):
|
|
100 |
|
101 |
# Map the predicted index back to the original class label using class_names
|
102 |
class_names = list(common_label_map.keys())
|
103 |
-
|
|
|
104 |
predicted_label = class_names[predicted_index.item()]
|
105 |
|
106 |
# Create JSON response
|
|
|
100 |
|
101 |
# Map the predicted index back to the original class label using class_names
|
102 |
class_names = list(common_label_map.keys())
|
103 |
+
|
104 |
+
predicted_index = torch.argmax(ensemble_outputs, dim=1)
|
105 |
predicted_label = class_names[predicted_index.item()]
|
106 |
|
107 |
# Create JSON response
|