Shivenduu commited on
Commit
031d680
·
1 Parent(s): 3d055d2

Decalred the cache folder for the transformers

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -12,17 +12,17 @@ app = Flask(__name__)
12
  CORS(app)
13
 
14
  # --- Data File ---
15
- DATA_DIR = 'data'
16
- LOGS_CSV = os.path.join(DATA_DIR, 'logs.csv')
17
  LOG_COLUMNS = ['date', 'exercise', 'water', 'reading', 'meditation', 'mood', 'journal_text']
18
 
19
  # --- Helper Function ---
20
  def init_log_file():
21
  """Creates the log file with headers if it doesn't exist."""
22
- if not os.path.exists("data"):
23
- os.makedirs("data")
24
  if not os.path.exists(LOGS_CSV):
25
- df = pd.DataFrame(columns=["date", "exercise", "water", "reading", "meditation", "mood", "journal_text"])
26
  df.to_csv(LOGS_CSV, index=False)
27
 
28
 
 
12
  CORS(app)
13
 
14
  # --- Data File ---
15
+ DATA_DIR = "/tmp/data"
16
+ LOGS_CSV = os.path.join(DATA_DIR, "logs.csv")
17
  LOG_COLUMNS = ['date', 'exercise', 'water', 'reading', 'meditation', 'mood', 'journal_text']
18
 
19
  # --- Helper Function ---
20
  def init_log_file():
21
  """Creates the log file with headers if it doesn't exist."""
22
+ if not os.path.exists(DATA_DIR):
23
+ os.makedirs(DATA_DIR, exist_ok=True)
24
  if not os.path.exists(LOGS_CSV):
25
+ df = pd.DataFrame(columns=LOG_COLUMNS)
26
  df.to_csv(LOGS_CSV, index=False)
27
 
28