akdeniz27 commited on
Commit
0adbfb8
1 Parent(s): 04643fd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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").to("cuda")
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