Brightsun10 commited on
Commit
b456e70
·
verified ·
1 Parent(s): 9eb62bf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -13,8 +13,8 @@ device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
13
  # Load the image processor and the model
14
  # The model is loaded once and cached for all subsequent inference calls
15
  print("Loading model...")
16
- processor = AutoImageProcessor.from_pretrained("./mask2former_model")
17
- model = Mask2FormerForUniversalSegmentation.from_pretrained("./mask2former_model").to(device)
18
  print("Model loaded successfully.")
19
 
20
  # Define the classes we are interested in.
 
13
  # Load the image processor and the model
14
  # The model is loaded once and cached for all subsequent inference calls
15
  print("Loading model...")
16
+ processor = AutoImageProcessor.from_pretrained("facebook/mask2former-swin-tiny-coco-instance")
17
+ model = Mask2FormerForUniversalSegmentation.from_pretrained("facebook/mask2former-swin-tiny-coco-instance").to(device)
18
  print("Model loaded successfully.")
19
 
20
  # Define the classes we are interested in.