ysharma HF Staff commited on
Commit
df3ca99
·
1 Parent(s): 8688b12
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -34,6 +34,7 @@ def google_docs_embed(dummy):
34
  with gr.Blocks() as demo:
35
  with gr.Row():
36
  text_editor = gr.Textbox(lines=20, interactive=True, )
 
37
  with gr.Row():
38
  b1 = gr.Button("Generate")
39
  b2 = gr.Button("Docs API")
@@ -41,7 +42,7 @@ with gr.Blocks() as demo:
41
  in_dummy = gr.Textbox(visible=False, value='dummy')
42
  embed_docs = gr.HTML()
43
 
44
- b1.click(fn=state_player, inputs=[text_editor, "state"], outputs=[text_editor, "state"])
45
  b2.click(google_docs_embed,in_dummy, embed_docs)
46
 
47
  demo.launch(debug=True, enable_queue=True)
 
34
  with gr.Blocks() as demo:
35
  with gr.Row():
36
  text_editor = gr.Textbox(lines=20, interactive=True, )
37
+ state = gr.State()
38
  with gr.Row():
39
  b1 = gr.Button("Generate")
40
  b2 = gr.Button("Docs API")
 
42
  in_dummy = gr.Textbox(visible=False, value='dummy')
43
  embed_docs = gr.HTML()
44
 
45
+ b1.click(fn=state_player, inputs=[text_editor,state], outputs=[text_editor,state])
46
  b2.click(google_docs_embed,in_dummy, embed_docs)
47
 
48
  demo.launch(debug=True, enable_queue=True)