multimodalart HF Staff commited on
Commit
2b73795
·
verified ·
1 Parent(s): 5d7325a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -28,7 +28,7 @@ try:
28
  model = AutoModelForImageTextToText.from_pretrained(
29
  MODEL_ID,
30
  torch_dtype=torch.bfloat16,
31
- # attn_implementation="flash_attention_2",
32
  trust_remote_code=True
33
  ).to("cuda")
34
  processor = AutoProcessor.from_pretrained(MODEL_ID, trust_remote_code=True)
@@ -266,6 +266,5 @@ else:
266
  outputs=[output_coords_component, output_image_component]
267
  )
268
 
269
- # --- Launch the Gradio app ---
270
  if __name__ == "__main__":
271
- demo.launch(debug=True) # Set debug=False for production
 
28
  model = AutoModelForImageTextToText.from_pretrained(
29
  MODEL_ID,
30
  torch_dtype=torch.bfloat16,
31
+ attn_implementation="flash_attention_2",
32
  trust_remote_code=True
33
  ).to("cuda")
34
  processor = AutoProcessor.from_pretrained(MODEL_ID, trust_remote_code=True)
 
266
  outputs=[output_coords_component, output_image_component]
267
  )
268
 
 
269
  if __name__ == "__main__":
270
+ demo.launch(debug=True)