Spaces:
Runtime error
Runtime error
Commit
·
5d6c4b7
1
Parent(s):
96ed08f
Update app.py
Browse files
app.py
CHANGED
@@ -59,6 +59,7 @@ def get_latest_reviews(db: sqlite3.Connection):
|
|
59 |
def ccogsphere(name: str, rate: int, celsci_Result: str):
|
60 |
db = sqlite3.connect(DB_FILE)
|
61 |
cursor = db.cursor()
|
|
|
62 |
reviews = pd.DataFrame(reviews, columns=["id", "date_created", "name", "rate", "celsci_Result"])
|
63 |
db.commit()
|
64 |
reviews, total_reviews = get_latest_reviews(db)
|
@@ -100,12 +101,13 @@ with gr.Blocks(css=css) as demo:
|
|
100 |
count = gr.Number(label="Rates!")
|
101 |
with gr.Row():
|
102 |
with gr.Column():
|
103 |
-
data = gr.Dataframe()
|
104 |
-
count = gr.Number(label="Rates!")
|
105 |
name = gr.Textbox(label="a") #, placeholder="What is your name?")
|
106 |
rate = gr.Textbox(label="b") #, placeholder="What is your name?") #gr.Radio(label="How satisfied are you with using gradio?", choices=[1, 2, 3, 4, 5])
|
107 |
celsci = gr.Textbox(label="c") #, lines=10, placeholder="Do you have any feedback on gradio?")
|
108 |
#run_actr()
|
|
|
109 |
submit = gr.Button(value=".")
|
110 |
submit.click(ccogsphere, [name, rate, celsci], [data, count])
|
111 |
demo.load(load_data, None, [data, count])
|
|
|
59 |
def ccogsphere(name: str, rate: int, celsci_Result: str):
|
60 |
db = sqlite3.connect(DB_FILE)
|
61 |
cursor = db.cursor()
|
62 |
+
reviews = db.execute("SELECT * FROM reviews ORDER BY id DESC limit 100").fetchall()
|
63 |
reviews = pd.DataFrame(reviews, columns=["id", "date_created", "name", "rate", "celsci_Result"])
|
64 |
db.commit()
|
65 |
reviews, total_reviews = get_latest_reviews(db)
|
|
|
101 |
count = gr.Number(label="Rates!")
|
102 |
with gr.Row():
|
103 |
with gr.Column():
|
104 |
+
#data = gr.Dataframe()
|
105 |
+
#count = gr.Number(label="Rates!")
|
106 |
name = gr.Textbox(label="a") #, placeholder="What is your name?")
|
107 |
rate = gr.Textbox(label="b") #, placeholder="What is your name?") #gr.Radio(label="How satisfied are you with using gradio?", choices=[1, 2, 3, 4, 5])
|
108 |
celsci = gr.Textbox(label="c") #, lines=10, placeholder="Do you have any feedback on gradio?")
|
109 |
#run_actr()
|
110 |
+
#load_data()
|
111 |
submit = gr.Button(value=".")
|
112 |
submit.click(ccogsphere, [name, rate, celsci], [data, count])
|
113 |
demo.load(load_data, None, [data, count])
|