Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ processor = Pix2StructProcessor.from_pretrained("google/pix2struct-docvqa-large"
|
|
7 |
|
8 |
def process_document(image, question):
|
9 |
image = Image.open(image)
|
10 |
-
inputs = processor(images=image, text=question, return_tensors="pt")
|
11 |
predictions = model.generate(**inputs)
|
12 |
return processor.decode(predictions[0], skip_special_tokens=True)
|
13 |
|
|
|
7 |
|
8 |
def process_document(image, question):
|
9 |
image = Image.open(image)
|
10 |
+
inputs = processor(images=image, text=question, return_tensors="pt")
|
11 |
predictions = model.generate(**inputs)
|
12 |
return processor.decode(predictions[0], skip_special_tokens=True)
|
13 |
|