Spaces:
Sleeping
Sleeping
Varun Wadhwa
commited on
Logs
Browse files
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())
|