mattraj commited on
Commit
25c1606
·
1 Parent(s): 92aa9ad

demo buildout 5

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -48,7 +48,7 @@ def infer(
48
  text: str,
49
  max_new_tokens: int
50
  ) -> str:
51
- inputs = processor(text=text, images=resize_and_pad(image), return_tensors="pt").to(device)
52
  with torch.inference_mode():
53
  generated_ids = model.generate(
54
  **inputs,
@@ -129,8 +129,8 @@ with gr.Blocks(css="style.css") as demo:
129
  outputs=chat_outputs,
130
  )
131
 
132
- examples = [["./diagnosis-1.jpg", "Transcribe the Arabic text."],
133
- ["./examples/sign.jpg", "Transcribe the Arabic text."]]
134
  gr.Markdown("")
135
 
136
  gr.Examples(
 
48
  text: str,
49
  max_new_tokens: int
50
  ) -> str:
51
+ inputs = processor(text=text, images=resize_and_pad(image, 448), return_tensors="pt").to(device)
52
  with torch.inference_mode():
53
  generated_ids = model.generate(
54
  **inputs,
 
129
  outputs=chat_outputs,
130
  )
131
 
132
+ examples = [["./diagnosis-1.png", "Transcribe the Arabic text."],
133
+ ["./sign.png", "Transcribe the Arabic text."]]
134
  gr.Markdown("")
135
 
136
  gr.Examples(