LemonPit commited on
Commit
f157bf0
1 Parent(s): e1ce63e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -8,7 +8,7 @@ from transformers import SamModel, SamProcessor
8
 
9
  # Load the processor and the finetuned model
10
  processor = SamProcessor.from_pretrained("facebook/sam-vit-base")
11
- model_path = "SAM/mito_model_checkpoint.pth"
12
  model = SamModel.from_pretrained("facebook/sam-vit-base")
13
  model.load_state_dict(torch.load(model_path, map_location=torch.device('cpu')))
14
  device = "cuda" if torch.cuda.is_available() else "cpu"
@@ -85,4 +85,4 @@ def server(input, output, session):
85
 
86
  # Create and run the Shiny app
87
  app = App(app_ui, server)
88
- app.run(port=8000)
 
8
 
9
  # Load the processor and the finetuned model
10
  processor = SamProcessor.from_pretrained("facebook/sam-vit-base")
11
+ model_path = "mito_model_checkpoint.pth"
12
  model = SamModel.from_pretrained("facebook/sam-vit-base")
13
  model.load_state_dict(torch.load(model_path, map_location=torch.device('cpu')))
14
  device = "cuda" if torch.cuda.is_available() else "cpu"
 
85
 
86
  # Create and run the Shiny app
87
  app = App(app_ui, server)
88
+ app.run(port=7860)