SahilJ2 commited on
Commit
5b02197
1 Parent(s): 20ceca0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -126,8 +126,8 @@ def m3(que, image):
126
  return processor3.token2json(sequence)['answer']
127
 
128
  def m4(que, image):
129
- processor3 = Pix2StructProcessor.from_pretrained('google/matcha-plotqa-v1')
130
- model3 = Pix2StructForConditionalGeneration.from_pretrained('google/matcha-plotqa-v1')
131
 
132
  inputs = processor3(images=image, text=que, return_tensors="pt")
133
  predictions = model3.generate(**inputs, max_new_tokens=512)
 
126
  return processor3.token2json(sequence)['answer']
127
 
128
  def m4(que, image):
129
+ processor3 = Pix2StructProcessor.from_pretrained('google/matcha-plotqa-v2')
130
+ model3 = Pix2StructForConditionalGeneration.from_pretrained('google/matcha-plotqa-v2')
131
 
132
  inputs = processor3(images=image, text=que, return_tensors="pt")
133
  predictions = model3.generate(**inputs, max_new_tokens=512)