Joshue Jadie commited on
Commit
4c68f94
1 Parent(s): b335213

updated web app

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -46,6 +46,12 @@ def tryNewStyle ():
46
  # if another_style_btn:
47
  page_container.empty()
48
 
 
 
 
 
 
 
49
  # SOME INITIAL SETUP
50
  # To hide some default streamlit components and to add some customizations
51
  hide_streamlit = """
@@ -229,6 +235,6 @@ if isValidImage:
229
 
230
  with col4:
231
  # download button
232
- st.download_button('Download Image', byte_encode, 'output.jpg', 'jpg')
233
 
234
  # st.write("---")
 
46
  # if another_style_btn:
47
  page_container.empty()
48
 
49
+ # callback when user downloads image
50
+ def downloadImage ():
51
+ page_container.empty()
52
+
53
+ tryNewImage()
54
+
55
  # SOME INITIAL SETUP
56
  # To hide some default streamlit components and to add some customizations
57
  hide_streamlit = """
 
235
 
236
  with col4:
237
  # download button
238
+ st.download_button('Download Image', byte_encode, 'output.jpg', 'jpg', on_click=downloadImage)
239
 
240
  # st.write("---")