pmbrito commited on
Commit
d90c525
1 Parent(s): fd8cfef

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -29,6 +29,7 @@ if raw_image != 'Select image':
29
 
30
  image = Image.open(raw_image)
31
  image = np.asarray(image)
 
32
 
33
  with st.spinner('Loading Model...'):
34
  feature_extractor = DPTFeatureExtractor.from_pretrained("Intel/dpt-large-ade")
@@ -36,7 +37,8 @@ if raw_image != 'Select image':
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
-
 
40
  with st.spinner('Preparing image...'):
41
  # prepare the image for the model (aligned resize)
42
  feature_extractor_inference = DPTFeatureExtractor(do_random_crop=False, do_pad=False)
 
29
 
30
  image = Image.open(raw_image)
31
  image = np.asarray(image)
32
+ st.success("Load Image: Success")
33
 
34
  with st.spinner('Loading Model...'):
35
  feature_extractor = DPTFeatureExtractor.from_pretrained("Intel/dpt-large-ade")
 
37
  model = DPTForSemanticSegmentation.from_pretrained("Intel/dpt-large-ade",ignore_mismatched_sizes=True,num_labels=len(id2label), id2label=id2label, label2id=label2id,reshape_last_stage=True)
38
  model = model.to(device)
39
  model.eval()
40
+
41
+ st.success("Load model: Success")
42
  with st.spinner('Preparing image...'):
43
  # prepare the image for the model (aligned resize)
44
  feature_extractor_inference = DPTFeatureExtractor(do_random_crop=False, do_pad=False)