Carkham commited on
Commit
44ef81a
·
verified ·
1 Parent(s): 5d6ce8f

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -34,6 +34,7 @@ try:
34
  processor = AutoProcessor.from_pretrained(MODEL_ID, trust_remote_code=True)
35
  model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
36
  MODEL_ID,
 
37
  trust_remote_code=True,
38
  torch_dtype=torch.float16,
39
  device_map="auto"
@@ -164,4 +165,4 @@ if __name__ == "__main__":
164
  clear.click(gradio_reset, inputs=None, outputs=[input_img, pred_otsl, output_html, rendered_html])
165
  predict.click(recognize_image, inputs=[input_img, max_tokens, temperature], outputs=[pred_otsl, output_html, rendered_html])
166
 
167
- demo.launch(server_name="0.0.0.0", server_port=10041, debug=True)
 
34
  processor = AutoProcessor.from_pretrained(MODEL_ID, trust_remote_code=True)
35
  model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
36
  MODEL_ID,
37
+ attn_implementation="flash_attention_2",
38
  trust_remote_code=True,
39
  torch_dtype=torch.float16,
40
  device_map="auto"
 
165
  clear.click(gradio_reset, inputs=None, outputs=[input_img, pred_otsl, output_html, rendered_html])
166
  predict.click(recognize_image, inputs=[input_img, max_tokens, temperature], outputs=[pred_otsl, output_html, rendered_html])
167
 
168
+ demo.launch(ssr_mode=False, show_error=True)