Spaces:
Runtime error
Runtime error
Commit
·
88912b5
1
Parent(s):
a1008dc
Update streamlit_config.py
Browse files- streamlit_config.py +6 -5
streamlit_config.py
CHANGED
@@ -22,10 +22,11 @@ def process_file(file):
|
|
22 |
|
23 |
|
24 |
def get_uploaded_file():
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
)
|
|
|
29 |
|
30 |
|
31 |
def download_button(file, name, format):
|
@@ -41,7 +42,7 @@ def run():
|
|
41 |
st.title("Semantic image segmentation")
|
42 |
st.subheader("Upload your image and get an image with segmentation")
|
43 |
|
44 |
-
|
45 |
if not file:
|
46 |
return
|
47 |
|
|
|
22 |
|
23 |
|
24 |
def get_uploaded_file():
|
25 |
+
img_url = st.text_input('Image URL', 'https://images.unsplash.com/photo-1556911220-bff31c812dba?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2468&q=80')
|
26 |
+
st.caption('Downloading Image...')
|
27 |
+
img_data = requests.get(img_url).content
|
28 |
+
with open('detect.jpg', 'wb') as handler:
|
29 |
+
handler.write(img_data)
|
30 |
|
31 |
|
32 |
def download_button(file, name, format):
|
|
|
42 |
st.title("Semantic image segmentation")
|
43 |
st.subheader("Upload your image and get an image with segmentation")
|
44 |
|
45 |
+
Image.open('detect.jpg')
|
46 |
if not file:
|
47 |
return
|
48 |
|