geshang commited on
Commit
4a728a6
·
verified ·
1 Parent(s): 6ffe2cd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -12
app.py CHANGED
@@ -61,7 +61,7 @@ from sam2.sam2_image_predictor import SAM2ImagePredictor
61
  print("🎉 SAM2 modules imported successfully!")
62
 
63
 
64
- MODEL_PATH = "geshang/Seg-R1-3B"
65
  SAM_CHECKPOINT = "sam2_weights/sam2.1_hiera_large.pt"
66
 
67
  DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
@@ -335,17 +335,17 @@ with gr.Blocks(title="Seg-R1") as demo:
335
  outputs=[text_output, image_output]
336
  )
337
 
338
- gr.Examples(
339
- examples=[
340
- ["imgs/cards.jpg", "Identify and segment the Ace of Spades."],
341
- ["imgs/painting.jpg", "Identify and segment the man an the house."],
342
- ["imgs/dogs.jpg", "Identify and segment the tongue of the dog."],
343
- ],
344
- inputs=[image_input, text_input],
345
- outputs=[text_output, image_output],
346
- fn=run_pipeline,
347
- cache_examples=True
348
- )
349
 
350
  if __name__ == "__main__":
351
  demo.launch(server_name="0.0.0.0", server_port=7860)
 
61
  print("🎉 SAM2 modules imported successfully!")
62
 
63
 
64
+ MODEL_PATH = "geshang/Seg-R1-7B"
65
  SAM_CHECKPOINT = "sam2_weights/sam2.1_hiera_large.pt"
66
 
67
  DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
 
335
  outputs=[text_output, image_output]
336
  )
337
 
338
+ # gr.Examples(
339
+ # examples=[
340
+ # ["imgs/cards.jpg", "Identify and segment the Ace of Spades."],
341
+ # ["imgs/painting.jpg", "Identify and segment the man an the house."],
342
+ # ["imgs/dogs.jpg", "Identify and segment the tongue of the dog."],
343
+ # ],
344
+ # inputs=[image_input, text_input],
345
+ # outputs=[text_output, image_output],
346
+ # fn=run_pipeline,
347
+ # cache_examples=True
348
+ # )
349
 
350
  if __name__ == "__main__":
351
  demo.launch(server_name="0.0.0.0", server_port=7860)