russkiyximik commited on
Commit
72dcbca
·
1 Parent(s): 398bff1

context 2

Browse files
Files changed (1) hide show
  1. mycoder/app.py +1 -1
mycoder/app.py CHANGED
@@ -9,7 +9,7 @@ if "temp_file_path" not in st.session_state: # Ensures temp_file_path is only se
9
  st.session_state.temp_file_path = None
10
 
11
  uploaded_file = st.file_uploader("Upload a CSV file", type="csv")
12
- if uploaded_file is not None:
13
  import tempfile
14
  with tempfile.NamedTemporaryFile(mode='wb', delete=False, suffix=".csv") as temp_file:
15
  temp_file.write(uploaded_file.getvalue())
 
9
  st.session_state.temp_file_path = None
10
 
11
  uploaded_file = st.file_uploader("Upload a CSV file", type="csv")
12
+ if uploaded_file is not None and st.session_state.temp_file_path is None:
13
  import tempfile
14
  with tempfile.NamedTemporaryFile(mode='wb', delete=False, suffix=".csv") as temp_file:
15
  temp_file.write(uploaded_file.getvalue())