AlexHung29629 commited on
Commit
37f620a
·
verified ·
1 Parent(s): 2eb0eec

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -13,7 +13,7 @@ processor = Pix2StructProcessor.from_pretrained("google/pix2struct-screen2words-
13
  # Define the function
14
  @spaces.GPU
15
  def describe_ui(image):
16
- inputs = processor(images=image, text="<s>", return_tensors="pt").to(dtype=torch.bfloat16, device="cuda")
17
  predictions = model.generate(**inputs)
18
  return processor.decode(predictions[0], skip_special_tokens=False)
19
 
 
13
  # Define the function
14
  @spaces.GPU
15
  def describe_ui(image):
16
+ inputs = processor(images=image, text="", return_tensors="pt").to(dtype=torch.bfloat16, device="cuda")
17
  predictions = model.generate(**inputs)
18
  return processor.decode(predictions[0], skip_special_tokens=False)
19