Varun Wadhwa commited on
Commit
d04aeed
·
unverified ·
1 Parent(s): 2d0c6e2
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -164,8 +164,8 @@ def evaluate_model(model, dataloader, device):
164
  if sample_count < num_samples:
165
  print(f"Sample {sample_count + 1}:")
166
  print(f"Tokens: {tokenizer.convert_ids_to_tokens(input_ids[i])}")
167
- print(f"True Labels: {[id2label[label] for label in valid_labels]}")
168
- print(f"Predicted Labels: {[id2label[pred] for pred in valid_preds]}")
169
  print("-" * 50)
170
  sample_count += 1
171
  all_preds.extend(valid_preds.tolist())
 
164
  if sample_count < num_samples:
165
  print(f"Sample {sample_count + 1}:")
166
  print(f"Tokens: {tokenizer.convert_ids_to_tokens(input_ids[i])}")
167
+ print(f"True Labels: {[id2label[label.item()] for label in valid_labels]}")
168
+ print(f"Predicted Labels: {[id2label[pred.item()] for pred in valid_preds]}")
169
  print("-" * 50)
170
  sample_count += 1
171
  all_preds.extend(valid_preds.tolist())