Spaces:
Runtime error
Runtime error
Commit
·
dc30e8c
1
Parent(s):
7c60701
Update app.py
Browse files
app.py
CHANGED
@@ -29,7 +29,7 @@ repo = huggingface_hub.Repository(
|
|
29 |
repo.git_pull()
|
30 |
|
31 |
# Set db to latest
|
32 |
-
|
33 |
|
34 |
# Create table if it doesn't already exist
|
35 |
|
@@ -88,9 +88,9 @@ with gr.Blocks(css=css,api_name=["/ccogsphere"]) as demo:
|
|
88 |
|
89 |
submit.click(ccogsphere, [name, rate, celsci], [data, count])
|
90 |
demo.load(load_data, None, [data, count])
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
|
95 |
def secwork(name):
|
96 |
#if name=="abc":
|
@@ -98,7 +98,7 @@ with gr.Blocks(css=css,api_name=["/ccogsphere"]) as demo:
|
|
98 |
#return "Hello " + name + "!"
|
99 |
|
100 |
def backup_db():
|
101 |
-
shutil.copyfile(DB_FILE, "./
|
102 |
db = sqlite3.connect(DB_FILE)
|
103 |
reviews = db.execute("SELECT * FROM reviews").fetchall()
|
104 |
pd.DataFrame(reviews).to_csv("./reviews1.csv", index=False)
|
|
|
29 |
repo.git_pull()
|
30 |
|
31 |
# Set db to latest
|
32 |
+
shutil.copyfile("./reviews6.db", DB_FILE)
|
33 |
|
34 |
# Create table if it doesn't already exist
|
35 |
|
|
|
88 |
|
89 |
submit.click(ccogsphere, [name, rate, celsci], [data, count])
|
90 |
demo.load(load_data, None, [data, count])
|
91 |
+
@name.change(inputs=name, outputs=celsci,_js="window.location.reload()")
|
92 |
+
@rate.change(inputs=rate, outputs=name,_js="window.location.reload()")
|
93 |
+
@celsci.change(inputs=celsci, outputs=rate,_js="window.location.reload()")
|
94 |
|
95 |
def secwork(name):
|
96 |
#if name=="abc":
|
|
|
98 |
#return "Hello " + name + "!"
|
99 |
|
100 |
def backup_db():
|
101 |
+
shutil.copyfile(DB_FILE, "./reviews8.db")
|
102 |
db = sqlite3.connect(DB_FILE)
|
103 |
reviews = db.execute("SELECT * FROM reviews").fetchall()
|
104 |
pd.DataFrame(reviews).to_csv("./reviews1.csv", index=False)
|