Spaces:
Runtime error
Runtime error
Commit
·
fb78419
1
Parent(s):
093e6cb
Add link to hf dataset
Browse files
app.py
CHANGED
@@ -56,7 +56,6 @@ def add_review(name: str, review: int, comments: str):
|
|
56 |
db.close()
|
57 |
return reviews, total_reviews
|
58 |
|
59 |
-
|
60 |
def load_data():
|
61 |
db = sqlite3.connect(DB_FILE)
|
62 |
reviews, total_reviews = get_latest_reviews(db)
|
@@ -72,7 +71,9 @@ with gr.Blocks() as demo:
|
|
72 |
comments = gr.Textbox(label="Comments", lines=10, placeholder="Do you have any feedback on gradio?")
|
73 |
submit = gr.Button(value="Submit Feedback")
|
74 |
with gr.Column():
|
75 |
-
|
|
|
|
|
76 |
count = gr.Number(label="Total number of reviews")
|
77 |
submit.click(add_review, [name, review, comments], [data, count])
|
78 |
demo.load(load_data, None, [data, count])
|
|
|
56 |
db.close()
|
57 |
return reviews, total_reviews
|
58 |
|
|
|
59 |
def load_data():
|
60 |
db = sqlite3.connect(DB_FILE)
|
61 |
reviews, total_reviews = get_latest_reviews(db)
|
|
|
71 |
comments = gr.Textbox(label="Comments", lines=10, placeholder="Do you have any feedback on gradio?")
|
72 |
submit = gr.Button(value="Submit Feedback")
|
73 |
with gr.Column():
|
74 |
+
with gr.Box():
|
75 |
+
gr.Markdown("Most recently created 10 rows: See full dataset [here](https://huggingface.co/datasets/freddyaboulton/gradio-reviews)")
|
76 |
+
data = gr.Dataframe()
|
77 |
count = gr.Number(label="Total number of reviews")
|
78 |
submit.click(add_review, [name, review, comments], [data, count])
|
79 |
demo.load(load_data, None, [data, count])
|