Update app.py
Browse files
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-
|
| 130 |
-
model3 = Pix2StructForConditionalGeneration.from_pretrained('google/matcha-plotqa-
|
| 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)
|