Upload infer_1.py with huggingface_hub
Browse files- infer_1.py +1 -2
infer_1.py
CHANGED
|
@@ -100,7 +100,6 @@ for batch_idx in tqdm(range(begin, end, batch_size)):
|
|
| 100 |
text=[text],
|
| 101 |
images=image_inputs,
|
| 102 |
videos=video_inputs,
|
| 103 |
-
fps=fps,
|
| 104 |
padding=True,
|
| 105 |
return_tensors="pt",
|
| 106 |
**video_kwargs,
|
|
@@ -119,7 +118,7 @@ for batch_idx in tqdm(range(begin, end, batch_size)):
|
|
| 119 |
if output_text == answer:
|
| 120 |
correct_num = correct_num + 1
|
| 121 |
save_data.append(save_)
|
| 122 |
-
|
| 123 |
write_json(save_data, "infer_answer.json")
|
| 124 |
|
| 125 |
|
|
|
|
| 100 |
text=[text],
|
| 101 |
images=image_inputs,
|
| 102 |
videos=video_inputs,
|
|
|
|
| 103 |
padding=True,
|
| 104 |
return_tensors="pt",
|
| 105 |
**video_kwargs,
|
|
|
|
| 118 |
if output_text == answer:
|
| 119 |
correct_num = correct_num + 1
|
| 120 |
save_data.append(save_)
|
| 121 |
+
print("correct_num", correct_num)
|
| 122 |
write_json(save_data, "infer_answer.json")
|
| 123 |
|
| 124 |
|