Spaces:
Runtime error
Runtime error
Commit
·
075c89b
1
Parent(s):
5dfe0f7
Update streamlit_config.py
Browse files- streamlit_config.py +5 -9
streamlit_config.py
CHANGED
@@ -21,14 +21,6 @@ def process_file(file):
|
|
21 |
)
|
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):
|
33 |
st.download_button(
|
34 |
label="Download processed image",
|
@@ -40,7 +32,11 @@ def download_button(file, name, format):
|
|
40 |
|
41 |
def run():
|
42 |
st.title("Semantic image segmentation")
|
43 |
-
|
|
|
|
|
|
|
|
|
44 |
Image.open('detect.jpg')
|
45 |
if not file:
|
46 |
return
|
|
|
21 |
)
|
22 |
|
23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
def download_button(file, name, format):
|
25 |
st.download_button(
|
26 |
label="Download processed image",
|
|
|
32 |
|
33 |
def run():
|
34 |
st.title("Semantic image segmentation")
|
35 |
+
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')
|
36 |
+
st.caption('Downloading Image...')
|
37 |
+
img_data = requests.get(img_url).content
|
38 |
+
with open('detect.jpg', 'wb') as handler:
|
39 |
+
handler.write(img_data)
|
40 |
Image.open('detect.jpg')
|
41 |
if not file:
|
42 |
return
|