aminaj commited on
Commit
466f999
1 Parent(s): 518abe0

Update BrainBot.py

Browse files
Files changed (1) hide show
  1. BrainBot.py +3 -2
BrainBot.py CHANGED
@@ -18,10 +18,11 @@ def save_uploaded_file(uploaded_file):
18
  st.write("read file")
19
  # Create a directory if it doesn't exist
20
  data_dir = "/data"
21
- os.makedirs(data_dir, exist_ok=True)
22
 
23
  # Create a temporary file in the data directory
24
- with tempfile.NamedTemporaryFile(delete=False, dir=data_dir) as temp_file:
 
25
  st.write("writing file...")
26
  temp_file.write(file_content) # Write the uploaded file content to the temporary file
27
  temp_file_path = temp_file.name # Get the path of the temporary file
 
18
  st.write("read file")
19
  # Create a directory if it doesn't exist
20
  data_dir = "/data"
21
+ # os.makedirs(data_dir, exist_ok=True)
22
 
23
  # Create a temporary file in the data directory
24
+ # with tempfile.NamedTemporaryFile(delete=False, dir=data_dir) as temp_file:
25
+ with tempfile.NamedTemporaryFile(delete=False) as temp_file:
26
  st.write("writing file...")
27
  temp_file.write(file_content) # Write the uploaded file content to the temporary file
28
  temp_file_path = temp_file.name # Get the path of the temporary file