Spaces:
Runtime error
Runtime error
Commit
·
d703732
1
Parent(s):
dd98e19
Update app.py
Browse files
app.py
CHANGED
@@ -16,14 +16,14 @@ from apscheduler.schedulers.background import BackgroundScheduler
|
|
16 |
import random
|
17 |
import time
|
18 |
|
19 |
-
DB_FILE = "./
|
20 |
|
21 |
TOKEN = os.environ.get('HF_KEY')
|
22 |
|
23 |
repo = huggingface_hub.Repository(
|
24 |
local_dir="data",
|
25 |
repo_type="dataset",
|
26 |
-
clone_from="
|
27 |
use_auth_token=TOKEN
|
28 |
)
|
29 |
repo.git_pull()
|
@@ -95,7 +95,7 @@ with gr.Blocks(css=css,api_name=["/ccogsphere"]) as demo:
|
|
95 |
#return "Hello " + name + "!"
|
96 |
|
97 |
def backup_db():
|
98 |
-
shutil.copyfile(DB_FILE, "./
|
99 |
db = sqlite3.connect(DB_FILE)
|
100 |
reviews = db.execute("SELECT * FROM reviews").fetchall()
|
101 |
pd.DataFrame(reviews).to_csv("./reviews1.csv", index=False)
|
|
|
16 |
import random
|
17 |
import time
|
18 |
|
19 |
+
DB_FILE = "./reviews0.db"
|
20 |
|
21 |
TOKEN = os.environ.get('HF_KEY')
|
22 |
|
23 |
repo = huggingface_hub.Repository(
|
24 |
local_dir="data",
|
25 |
repo_type="dataset",
|
26 |
+
clone_from="CogSphere/dataset1",
|
27 |
use_auth_token=TOKEN
|
28 |
)
|
29 |
repo.git_pull()
|
|
|
95 |
#return "Hello " + name + "!"
|
96 |
|
97 |
def backup_db():
|
98 |
+
shutil.copyfile(DB_FILE, "./reviews0.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)
|