pmbrito commited on
Commit
fd8cfef
·
1 Parent(s): 0f5d290

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -31,9 +31,9 @@ if raw_image != 'Select image':
31
  image = np.asarray(image)
32
 
33
  with st.spinner('Loading Model...'):
34
- feature_extractor = DPTFeatureExtractor.from_pretrained("Intel/dpt-large-ade")
35
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
36
- model = DPTForSemanticSegmentation.from_pretrained("Intel/dpt-large-ade",ignore_mismatched_sizes=True,num_labels=len(id2label), id2label=id2label, label2id=label2id,reshape_last_stage=True)
37
  model = model.to(device)
38
  model.eval()
39
 
 
31
  image = np.asarray(image)
32
 
33
  with st.spinner('Loading Model...'):
34
+ feature_extractor = DPTFeatureExtractor.from_pretrained("Intel/dpt-large-ade")
35
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
36
+ model = DPTForSemanticSegmentation.from_pretrained("Intel/dpt-large-ade",ignore_mismatched_sizes=True,num_labels=len(id2label), id2label=id2label, label2id=label2id,reshape_last_stage=True)
37
  model = model.to(device)
38
  model.eval()
39