mavinsao commited on
Commit
47ee254
·
verified ·
1 Parent(s): 0b2c300
Files changed (1) hide show
  1. app.py +2 -1
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
- predicted_index = torch.argmax(output, dim=1)
 
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