Spaces:
Runtime error
Runtime error
lorocksUMD
commited on
Commit
•
43605d2
1
Parent(s):
a22129a
Update script.py
Browse files
script.py
CHANGED
@@ -156,6 +156,13 @@ with torch.inference_mode():
|
|
156 |
)
|
157 |
|
158 |
outputs = tokenizer.batch_decode(output_ids, skip_special_tokens=True)[0].strip()
|
159 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
print(outputs)
|
161 |
# End Llava inference
|
|
|
156 |
)
|
157 |
|
158 |
outputs = tokenizer.batch_decode(output_ids, skip_special_tokens=True)[0].strip()
|
159 |
+
|
160 |
+
if "dataset1" in image_file:
|
161 |
+
print("Num of words: ", len(outputs))
|
162 |
+
elif "dataset2" in image_file:
|
163 |
+
print()
|
164 |
+
else:
|
165 |
+
print("Is single word?", len((outputs).split()) == 1)
|
166 |
+
|
167 |
print(outputs)
|
168 |
# End Llava inference
|