CognitiveScience commited on
Commit
f99f85f
1 Parent(s): e74f020

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -29,7 +29,7 @@ repo = huggingface_hub.Repository(
29
  repo.git_pull()
30
 
31
  # Set db to latest
32
- shutil.copyfile("./reviews.db", DB_FILE)
33
 
34
  # Create table if it doesn't already exist
35
 
@@ -98,7 +98,7 @@ def backup_db():
98
  shutil.copyfile(DB_FILE, "./reviews1.db")
99
  db = sqlite3.connect(DB_FILE)
100
  reviews = db.execute("SELECT * FROM reviews").fetchall()
101
- pd.DataFrame(reviews).to_csv("./reviews.csv", index=False)
102
  print("updating db")
103
  repo.push_to_hub(blocking=False, commit_message=f"Updating data at {datetime.datetime.now()}")
104
 
 
29
  repo.git_pull()
30
 
31
  # Set db to latest
32
+ shutil.copyfile("./data/reviews.db", DB_FILE)
33
 
34
  # Create table if it doesn't already exist
35
 
 
98
  shutil.copyfile(DB_FILE, "./reviews1.db")
99
  db = sqlite3.connect(DB_FILE)
100
  reviews = db.execute("SELECT * FROM reviews").fetchall()
101
+ pd.DataFrame(reviews).to_csv("./reviews1.csv", index=False)
102
  print("updating db")
103
  repo.push_to_hub(blocking=False, commit_message=f"Updating data at {datetime.datetime.now()}")
104