Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -5,12 +5,16 @@ import streamlit as st
|
|
5 |
|
6 |
url = "http://images.cocodataset.org/val2017/000000039769.jpg"
|
7 |
image = Image.open(requests.get(url, stream=True).raw)
|
|
|
8 |
|
9 |
feature_extractor = DPTFeatureExtractor.from_pretrained("Intel/dpt-large-ade")
|
10 |
model = DPTForSemanticSegmentation.from_pretrained("Intel/dpt-large-ade")
|
|
|
11 |
|
12 |
inputs = feature_extractor(images=image, return_tensors="pt")
|
|
|
13 |
|
14 |
outputs = model(**inputs)
|
15 |
logits = outputs.logits
|
16 |
-
st.text(str(logits))
|
|
|
|
5 |
|
6 |
url = "http://images.cocodataset.org/val2017/000000039769.jpg"
|
7 |
image = Image.open(requests.get(url, stream=True).raw)
|
8 |
+
st.success("Image open: Success")
|
9 |
|
10 |
feature_extractor = DPTFeatureExtractor.from_pretrained("Intel/dpt-large-ade")
|
11 |
model = DPTForSemanticSegmentation.from_pretrained("Intel/dpt-large-ade")
|
12 |
+
st.success("Load model: Success")
|
13 |
|
14 |
inputs = feature_extractor(images=image, return_tensors="pt")
|
15 |
+
st.success("Feature extraction: Success")
|
16 |
|
17 |
outputs = model(**inputs)
|
18 |
logits = outputs.logits
|
19 |
+
#st.text(str(logits))
|
20 |
+
st.success("Success")
|