Scharbhen commited on
Commit
ead20dc
·
verified ·
1 Parent(s): 8df48e3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -21,7 +21,8 @@ def infer_ocrvqa(image, question):
21
 
22
  inputs = processor(images=image,text=question, return_tensors="pt").to("cuda")
23
 
24
- predictions = model.generate(**inputs, max_new_tokens=100)
 
25
  return processor.decode(predictions[0], skip_special_tokens=True)[len(question):].lstrip("\n")
26
 
27
  @spaces.GPU
 
21
 
22
  inputs = processor(images=image,text=question, return_tensors="pt").to("cuda")
23
 
24
+ predictions = model.generate(**inputs, max_new_tokens=500)
25
+
26
  return processor.decode(predictions[0], skip_special_tokens=True)[len(question):].lstrip("\n")
27
 
28
  @spaces.GPU