aminaj commited on
Commit
56cd5cd
·
verified ·
1 Parent(s): 98665ce

Update BrainBot.py

Browse files
Files changed (1) hide show
  1. BrainBot.py +3 -3
BrainBot.py CHANGED
@@ -17,8 +17,8 @@ def save_uploaded_file(uploaded_file):
17
  file_content = uploaded_file.read() # Load the document
18
 
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:
@@ -30,7 +30,7 @@ def save_uploaded_file(uploaded_file):
30
  def save_uploaded_image(uploaded_image):
31
  # Create a directory named "images" if it doesn't exist
32
  images_dir = "/images"
33
- # os.makedirs(images_dir, exist_ok=True)
34
 
35
  # Create a temporary file path within the "images" directory with .png extension
36
  temp_file_path = os.path.join(images_dir, tempfile.NamedTemporaryFile(suffix=".png").name)
 
17
  file_content = uploaded_file.read() # Load the document
18
 
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:
 
30
  def save_uploaded_image(uploaded_image):
31
  # Create a directory named "images" if it doesn't exist
32
  images_dir = "/images"
33
+ os.makedirs(images_dir, exist_ok=True)
34
 
35
  # Create a temporary file path within the "images" directory with .png extension
36
  temp_file_path = os.path.join(images_dir, tempfile.NamedTemporaryFile(suffix=".png").name)