Spaces:
Running
Running
liudongqing
commited on
Commit
·
0dc8745
1
Parent(s):
121cb66
reduce the tokens
Browse files
app.py
CHANGED
@@ -29,7 +29,7 @@ def score_it(input_img):
|
|
29 |
# Now use the PIL Image as before
|
30 |
image = pil_image.convert("RGB").resize((224, 224))
|
31 |
|
32 |
-
prompt = "<|begin_of_text
|
33 |
inputs = processor(image, prompt, return_tensors="pt").to(model.device)
|
34 |
|
35 |
output = model.generate(**inputs, max_new_tokens=200)
|
|
|
29 |
# Now use the PIL Image as before
|
30 |
image = pil_image.convert("RGB").resize((224, 224))
|
31 |
|
32 |
+
prompt = "<|image|><|begin_of_text|>show me the text in this picture"
|
33 |
inputs = processor(image, prompt, return_tensors="pt").to(model.device)
|
34 |
|
35 |
output = model.generate(**inputs, max_new_tokens=200)
|