Spaces:
Runtime error
Runtime error
muhammadzain
commited on
Commit
•
f94d6be
1
Parent(s):
f6a6d05
Update app.py
Browse files
app.py
CHANGED
@@ -55,7 +55,7 @@ def upscale(file,task,_progressBar = None):
|
|
55 |
|
56 |
with st.sidebar:
|
57 |
st.info("Operation in progress. Please wait.",icon="ℹ️")
|
58 |
-
my_bar = st.progress(0
|
59 |
|
60 |
for percent_complete in range(length):
|
61 |
frame = cap.read()[1]
|
@@ -232,7 +232,7 @@ with col2:
|
|
232 |
|
233 |
|
234 |
|
235 |
-
if st.button(
|
236 |
if st.session_state.get('opt1') == True:
|
237 |
task = st.session_state.opt1_selBox
|
238 |
else:
|
@@ -249,10 +249,10 @@ with col2:
|
|
249 |
st.session_state.disable_download = True
|
250 |
|
251 |
if st.session_state.disable_download == True:
|
252 |
-
st.button(
|
253 |
else:
|
254 |
with open('processed_'+file.name, "rb") as download_file:
|
255 |
-
st.download_button(label=
|
256 |
file_name= 'processed_'+file.name, mime= "image/png",
|
257 |
disabled=st.session_state.disable_download)
|
258 |
|
|
|
55 |
|
56 |
with st.sidebar:
|
57 |
st.info("Operation in progress. Please wait.",icon="ℹ️")
|
58 |
+
my_bar = st.progress(0)
|
59 |
|
60 |
for percent_complete in range(length):
|
61 |
frame = cap.read()[1]
|
|
|
232 |
|
233 |
|
234 |
|
235 |
+
if st.button(20*" "+"PROCEED"+" "*20,disabled=st.session_state.disable_proceed) and file is not None:
|
236 |
if st.session_state.get('opt1') == True:
|
237 |
task = st.session_state.opt1_selBox
|
238 |
else:
|
|
|
249 |
st.session_state.disable_download = True
|
250 |
|
251 |
if st.session_state.disable_download == True:
|
252 |
+
st.button(13*" "+"DOWNLOAD FILE"+" "*13,disabled=True)
|
253 |
else:
|
254 |
with open('processed_'+file.name, "rb") as download_file:
|
255 |
+
st.download_button(label=13*" "+"DOWNLOAD FILE"+" "*13, data=download_file,
|
256 |
file_name= 'processed_'+file.name, mime= "image/png",
|
257 |
disabled=st.session_state.disable_download)
|
258 |
|