CognitiveScience commited on
Commit
4b1f19a
·
1 Parent(s): 884f837

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -48,7 +48,7 @@ repo.git_pull()
48
  #login(token=TOKENR)
49
 
50
  # Set db to latest
51
- shutil.copyfile("./data/reviews.db", DB_FILE)
52
 
53
  # Create table if it doesn't already exist
54
 
@@ -210,9 +210,9 @@ def backup_db():
210
  shutil.copyfile(DB_FILE, "./data/reviews.db")
211
  db = sqlite3.connect(DB_FILE)
212
  reviews = db.execute("SELECT * FROM reviews").fetchall()
213
- pd.DataFrame(reviews).to_csv("./reviews.csv", index=False)
214
  print("updating db")
215
- repo.push_to_hub(blocking=False, commit_message=f"Updating data at {datetime.datetime.now()}")
216
 
217
  def backup_db_csv():
218
  shutil.copyfile(DB_FILE, "./reviews2.db")
 
48
  #login(token=TOKENR)
49
 
50
  # Set db to latest
51
+ #shutil.copyfile("./data/reviews.db", DB_FILE)
52
 
53
  # Create table if it doesn't already exist
54
 
 
210
  shutil.copyfile(DB_FILE, "./data/reviews.db")
211
  db = sqlite3.connect(DB_FILE)
212
  reviews = db.execute("SELECT * FROM reviews").fetchall()
213
+ pd.DataFrame(reviews).to_csv("./reviews000.csv", index=False)
214
  print("updating db")
215
+ repo.push_to_hub(blocking=False, commit_message="comm msg") #f"Updating data at {datetime.datetime.now()}")
216
 
217
  def backup_db_csv():
218
  shutil.copyfile(DB_FILE, "./reviews2.db")