lysandre HF staff commited on
Commit
31dbddc
1 Parent(s): db953f4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -29,6 +29,9 @@ allow_flagging="never"
29
  def token_text(visible=False):
30
  return gr.Text(max_lines=1, label="your_hf_token", visible=visible)
31
 
 
 
 
32
  with gr.Blocks(title=title) as demo:
33
  description = gr.Markdown(f"""# {title}""")
34
  description = gr.Markdown(DESCRIPTION)
@@ -46,6 +49,6 @@ with gr.Blocks(title=title) as demo:
46
  output = gr.Markdown()
47
 
48
  is_private.change(lambda s: token_text(s), inputs=is_private, outputs=token)
49
- submit.click(lambda a, b, c: f"{a}, {b}, {c}", inputs=[model_id, is_private, token], outputs=output, concurrency_limit=1)
50
 
51
  demo.queue(max_size=10, api_open=True).launch(show_api=True)
 
29
  def token_text(visible=False):
30
  return gr.Text(max_lines=1, label="your_hf_token", visible=visible)
31
 
32
+ def run(a, b, c):
33
+ return f"{a}, {b}, {c}"
34
+
35
  with gr.Blocks(title=title) as demo:
36
  description = gr.Markdown(f"""# {title}""")
37
  description = gr.Markdown(DESCRIPTION)
 
49
  output = gr.Markdown()
50
 
51
  is_private.change(lambda s: token_text(s), inputs=is_private, outputs=token)
52
+ submit.click(run, inputs=[model_id, is_private, token], outputs=output, concurrency_limit=1)
53
 
54
  demo.queue(max_size=10, api_open=True).launch(show_api=True)