merve HF staff commited on
Commit
34d659e
1 Parent(s): 6a8ba71

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -16,8 +16,8 @@ def infer_diagram(image, question):
16
 
17
  @spaces.GPU
18
  def infer_ocrvqa(image, question):
19
- model = Pix2StructForConditionalGeneration.from_pretrained("google/paligemma-3b-ft-ocrvqa-896").to("cuda")
20
- processor = Pix2StructProcessor.from_pretrained("google/paligemma-3b-ft-ocrvqa-896e")
21
 
22
  inputs = processor(images=image,text=question, return_tensors="pt").to("cuda")
23
 
 
16
 
17
  @spaces.GPU
18
  def infer_ocrvqa(image, question):
19
+ model = PaliGemmaForConditionalGeneration.from_pretrained("google/paligemma-3b-ft-ocrvqa-896").to("cuda")
20
+ processor = PaliGemmaProcessor.from_pretrained("google/paligemma-3b-ft-ocrvqa-896e")
21
 
22
  inputs = processor(images=image,text=question, return_tensors="pt").to("cuda")
23