Update app.py
Browse files
    	
        app.py
    CHANGED
    
    | @@ -189,6 +189,9 @@ if uploaded_file is not None: | |
| 189 | 
             
                    shutil.make_archive("predictions", 'zip', "predictions")
         | 
| 190 | 
             
                    with open('predictions.zip', 'rb') as f:
         | 
| 191 | 
             
                        res = f.read()
         | 
|  | |
|  | |
|  | |
| 192 | 
             
                    download = st.download_button(label="Download", data=res, 
         | 
| 193 | 
             
                                                  file_name=f'{fname}_{int(scale*128)}.zip', 
         | 
| 194 | 
             
                                                  disabled=st.session_state.get("disabled", True), 
         | 
| @@ -211,7 +214,4 @@ if uploaded_file is not None: | |
| 211 | 
             
                    if decompose or download:            
         | 
| 212 | 
             
                        image_decomposed = decompose_cavity(y_pred_th)
         | 
| 213 |  | 
| 214 | 
            -
                        plot_decomposed(image_decomposed)
         | 
| 215 | 
            -
             | 
| 216 | 
            -
                    if st.session_state.get("decompose", True):
         | 
| 217 | 
            -
                        st.session_state.disabled = False
         | 
|  | |
| 189 | 
             
                    shutil.make_archive("predictions", 'zip', "predictions")
         | 
| 190 | 
             
                    with open('predictions.zip', 'rb') as f:
         | 
| 191 | 
             
                        res = f.read()
         | 
| 192 | 
            +
             | 
| 193 | 
            +
                   if st.session_state.get("decompose", False):
         | 
| 194 | 
            +
                        st.session_state.disabled = False
         | 
| 195 | 
             
                    download = st.download_button(label="Download", data=res, 
         | 
| 196 | 
             
                                                  file_name=f'{fname}_{int(scale*128)}.zip', 
         | 
| 197 | 
             
                                                  disabled=st.session_state.get("disabled", True), 
         | 
|  | |
| 214 | 
             
                    if decompose or download:            
         | 
| 215 | 
             
                        image_decomposed = decompose_cavity(y_pred_th)
         | 
| 216 |  | 
| 217 | 
            +
                        plot_decomposed(image_decomposed)
         | 
|  | |
|  | |
|  | 
