ChogwuCY commited on
Commit
48da5f6
·
verified ·
1 Parent(s): 4564135

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -264,6 +264,8 @@ def run(q, top_k, max_len, thresh, lang_code):
264
  # =========================
265
  # Gradio App
266
  # =========================
 
 
267
  with gr.Blocks(title="Salatus QA — Question-Only", css=CSS, theme=gr.themes.Soft()) as demo:
268
  gr.HTML(
269
  f"""
@@ -322,7 +324,8 @@ with gr.Blocks(title="Salatus QA — Question-Only", css=CSS, theme=gr.themes.So
322
  def run(q, top_k_, max_len_, thresh_, lang_code):
323
  return run(q_, top_k_, max_len_, thresh_, lang_code)
324
 
325
- btn_ask.click(_run, inputs=[q, top_k, max_len, thresh, lang], outputs=[ans, sent, html, tops, rets])
 
326
 
327
  # Update labels when language toggles
328
  def switch_labels(code):
 
264
  # =========================
265
  # Gradio App
266
  # =========================
267
+ def run_click(q, top_k, max_len, thresh, lang_code):
268
+ return run(q, top_k, max_len, thresh, lang_code)
269
  with gr.Blocks(title="Salatus QA — Question-Only", css=CSS, theme=gr.themes.Soft()) as demo:
270
  gr.HTML(
271
  f"""
 
324
  def run(q, top_k_, max_len_, thresh_, lang_code):
325
  return run(q_, top_k_, max_len_, thresh_, lang_code)
326
 
327
+ btn_ask.click(run_click, inputs=[q, top_k, max_len, thresh, lang],
328
+ outputs=[ans, sent, html, tops, rets])
329
 
330
  # Update labels when language toggles
331
  def switch_labels(code):