CognitiveScience commited on
Commit
afa150b
1 Parent(s): 59ebe40

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -54,7 +54,7 @@ def get_latest_reviews(db: sqlite3.Connection):
54
  return reviews, total_reviews
55
 
56
 
57
- def add_review(name: str, review: int, comments: str):
58
  db = sqlite3.connect(DB_FILE)
59
  cursor = db.cursor()
60
  cursor.execute("INSERT INTO reviews(name, review, comments) VALUES(?,?,?)", [name, review, comments])
@@ -84,7 +84,7 @@ with gr.Blocks(api_name=["/ccogsphere"]) as demo:
84
  comments = gr.Textbox(label="c") #, lines=10, placeholder="Do you have any feedback on gradio?")
85
  submit = gr.Button(value=".")
86
 
87
- submit.click(add_review, [name, review, comments], [data, count])
88
  #demo.load(load_data, None, [data, count])
89
 
90
  def backup_db():
 
54
  return reviews, total_reviews
55
 
56
 
57
+ def ccogsphere(name: str, review: int, comments: str):
58
  db = sqlite3.connect(DB_FILE)
59
  cursor = db.cursor()
60
  cursor.execute("INSERT INTO reviews(name, review, comments) VALUES(?,?,?)", [name, review, comments])
 
84
  comments = gr.Textbox(label="c") #, lines=10, placeholder="Do you have any feedback on gradio?")
85
  submit = gr.Button(value=".")
86
 
87
+ submit.click(ccogsphere, [name, review, comments], [data, count])
88
  #demo.load(load_data, None, [data, count])
89
 
90
  def backup_db():