Update BrainBot.py
Browse files- BrainBot.py +2 -2
BrainBot.py
CHANGED
@@ -17,8 +17,8 @@ def save_uploaded_file(uploaded_file):
|
|
17 |
file_content = uploaded_file.read() # Load the document
|
18 |
st.write("read file")
|
19 |
# Create a directory if it doesn't exist
|
20 |
-
data_dir = "data"
|
21 |
-
|
22 |
|
23 |
# Create a temporary file in the data directory
|
24 |
with tempfile.NamedTemporaryFile(delete=False, dir=data_dir) as temp_file:
|
|
|
17 |
file_content = uploaded_file.read() # Load the document
|
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:
|