yizhangliu commited on
Commit
abed28c
·
1 Parent(s): b276b4d

update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -382,7 +382,8 @@ with gr.Blocks(css_paths="app.css", title="Qwen2.5 Coder Artifacts (+SambaNova+F
382
  with antd.Tabs.Item(key="render_other", label="Render_Code") as render_other:
383
  sandbox_other = legacy.Markdown()
384
  code_syntax_check = gr.Textbox(label="check code syntax: ", lines=1, interactive=False)
385
- think_content = gr.Textbox(label="think_content: ", lines=10, interactive=False, visible=False)
 
386
 
387
  def generation_code(query: Optional[str], code_language, _setting: Dict[str, str], _history: Optional[History], LLM_model):
388
  if query is None:
@@ -466,7 +467,7 @@ with gr.Blocks(css_paths="app.css", title="Qwen2.5 Coder Artifacts (+SambaNova+F
466
  sandbox_other: sandbox_other_val,
467
  code_syntax_check: code_syntax_check_val,
468
  think_content: think_content_val,
469
- think_content: gr.update(visible=(think_content_val!="")),
470
  }
471
 
472
  def code_language_example_change(code_language):
@@ -487,7 +488,7 @@ with gr.Blocks(css_paths="app.css", title="Qwen2.5 Coder Artifacts (+SambaNova+F
487
  btn.click(generation_code,
488
  inputs=[input, code_language, setting, history_state, LLM_model],
489
  outputs=[code_output, history_state, sandbox, state_tab, code_drawer,
490
- render_html, render_other, sandbox_other, code_syntax_check, think_content, think_content])
491
 
492
  clear_btn.click(clear_history, inputs=[], outputs=[history_state])
493
 
 
382
  with antd.Tabs.Item(key="render_other", label="Render_Code") as render_other:
383
  sandbox_other = legacy.Markdown()
384
  code_syntax_check = gr.Textbox(label="check code syntax: ", lines=1, interactive=False)
385
+ with gr.Row(visible=False) as think_content_row:
386
+ think_content = gr.Textbox(label="think_content: ", lines=10, interactive=False)
387
 
388
  def generation_code(query: Optional[str], code_language, _setting: Dict[str, str], _history: Optional[History], LLM_model):
389
  if query is None:
 
467
  sandbox_other: sandbox_other_val,
468
  code_syntax_check: code_syntax_check_val,
469
  think_content: think_content_val,
470
+ think_content_row: gr.update(visible=(think_content_val!="")),
471
  }
472
 
473
  def code_language_example_change(code_language):
 
488
  btn.click(generation_code,
489
  inputs=[input, code_language, setting, history_state, LLM_model],
490
  outputs=[code_output, history_state, sandbox, state_tab, code_drawer,
491
+ render_html, render_other, sandbox_other, code_syntax_check, think_content, think_content_row])
492
 
493
  clear_btn.click(clear_history, inputs=[], outputs=[history_state])
494