Spaces:
Runtime error
Runtime error
Daniel Verdu
commited on
Commit
β’
37af171
1
Parent(s):
19189d6
added progress bar
Browse files
app.py
CHANGED
@@ -210,7 +210,7 @@ st.markdown("This app puts color into your black and white pictures")
|
|
210 |
st_title_message = st.empty()
|
211 |
st_progress_bar = st.empty()
|
212 |
st_file_uploader = st.empty()
|
213 |
-
|
214 |
st_input_img = st.empty()
|
215 |
st_output_img = st.empty()
|
216 |
st_download_button = st.empty()
|
@@ -241,11 +241,11 @@ if colorizer is not None:
|
|
241 |
st_title_message.markdown("**To begin, please upload an image** π")
|
242 |
|
243 |
#Choose your own image
|
244 |
-
with
|
245 |
uploaded_files = st_file_uploader.file_uploader("Upload a black and white photo",
|
246 |
type=['png', 'jpg', 'jpeg'],
|
247 |
accept_multiple_files=True)
|
248 |
-
submitted =
|
249 |
|
250 |
if submitted and uploaded_files is not None:
|
251 |
if len(uploaded_files) == 1:
|
|
|
210 |
st_title_message = st.empty()
|
211 |
st_progress_bar = st.empty()
|
212 |
st_file_uploader = st.empty()
|
213 |
+
st_submit_form = st.empty()
|
214 |
st_input_img = st.empty()
|
215 |
st_output_img = st.empty()
|
216 |
st_download_button = st.empty()
|
|
|
241 |
st_title_message.markdown("**To begin, please upload an image** π")
|
242 |
|
243 |
#Choose your own image
|
244 |
+
with st_submit_form.form("my-form", clear_on_submit=True):
|
245 |
uploaded_files = st_file_uploader.file_uploader("Upload a black and white photo",
|
246 |
type=['png', 'jpg', 'jpeg'],
|
247 |
accept_multiple_files=True)
|
248 |
+
submitted = st.form_submit_button("UPLOAD!")
|
249 |
|
250 |
if submitted and uploaded_files is not None:
|
251 |
if len(uploaded_files) == 1:
|