SahilJ2 commited on
Commit
9c6aa3b
1 Parent(s): 6087f11

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -126,8 +126,9 @@ def m3(que, image):
126
  # return processor3.token2json(sequence)['answer']
127
 
128
 
129
- processor3 = AutoProcessor.from_pretrained("google/pix2struct-docvqa-large")
130
- model3 = AutoModelForSeq2SeqLM.from_pretrained("google/pix2struct-docvqa-large")
 
131
 
132
  inputs = processor3(images=image, text=que, return_tensors="pt")
133
 
 
126
  # return processor3.token2json(sequence)['answer']
127
 
128
 
129
+ model3 = Pix2StructForConditionalGeneration.from_pretrained("google/pix2struct-docvqa-large")
130
+ processor3 = Pix2StructProcessor.from_pretrained("google/pix2struct-docvqa-large")
131
+
132
 
133
  inputs = processor3(images=image, text=que, return_tensors="pt")
134