seawolf2357 commited on
Commit
63908f9
ยท
verified ยท
1 Parent(s): 6569a3e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -12
app.py CHANGED
@@ -577,17 +577,16 @@ with gr.Blocks(css_paths="app.css",theme=theme) as demo:
577
 
578
  with ms.Application() as app:
579
  with antd.ConfigProvider():
580
- # Drawer ์ปดํฌ๋„ŒํŠธ๋“ค
581
-
582
-
583
-
584
  with antd.Drawer(open=False, title="code", placement="left", width="750px") as code_drawer:
585
  code_output = legacy.Markdown()
586
 
587
  with antd.Drawer(open=False, title="history", placement="left", width="900px") as history_drawer:
588
  history_output = legacy.Chatbot(show_label=False, flushing=False, height=960, elem_classes="history_chatbot")
589
 
590
- # ์„ธ์…˜ ๊ด€๋ จ UI ์ˆ˜์ •
 
 
591
  with antd.Drawer(
592
  open=False,
593
  title="Templates",
@@ -606,6 +605,7 @@ with gr.Blocks(css_paths="app.css",theme=theme) as demo:
606
  )
607
 
608
 
 
609
  # ์„ธ์…˜ ๋“œ๋กœ์–ด์—์„œ ์นด๋“œ ํด๋ฆญ ์‹œ ์‹คํ–‰ํ•  ํ•จ์ˆ˜ (Drawer ์ปดํฌ๋„ŒํŠธ๋“ค ๋‹ค์Œ์— ์œ„์น˜)
610
  def execute_history_item(evt: gr.SelectData): # gr.SelectData๋กœ ์ด๋ฒคํŠธ ๋ฐ์ดํ„ฐ ๋ฐ›๊ธฐ
611
  try:
@@ -847,15 +847,9 @@ with gr.Blocks(css_paths="app.css",theme=theme) as demo:
847
  close_btn.click(
848
  lambda: (gr.update(open=False), gr.HTML("")),
849
  outputs=[session_drawer, session_history]
850
- )
851
-
852
-
853
- session_list.change(
854
- load_session_history,
855
- inputs=[session_list],
856
- outputs=[session_history]
857
  )
858
 
 
859
  btn.click(
860
  demo_instance.generation_code,
861
  inputs=[input, setting, history],
 
577
 
578
  with ms.Application() as app:
579
  with antd.ConfigProvider():
580
+ # Drawer ์ปดํฌ๋„ŒํŠธ๋“ค
 
 
 
581
  with antd.Drawer(open=False, title="code", placement="left", width="750px") as code_drawer:
582
  code_output = legacy.Markdown()
583
 
584
  with antd.Drawer(open=False, title="history", placement="left", width="900px") as history_drawer:
585
  history_output = legacy.Chatbot(show_label=False, flushing=False, height=960, elem_classes="history_chatbot")
586
 
587
+
588
+ # session_list ๊ด€๋ จ ์ฝ”๋“œ๋ฅผ ๋ชจ๋‘ ์ œ๊ฑฐํ•˜๊ณ  ์ˆ˜์ •๋œ ๋ฒ„์ „์ž…๋‹ˆ๋‹ค
589
+
590
  with antd.Drawer(
591
  open=False,
592
  title="Templates",
 
605
  )
606
 
607
 
608
+
609
  # ์„ธ์…˜ ๋“œ๋กœ์–ด์—์„œ ์นด๋“œ ํด๋ฆญ ์‹œ ์‹คํ–‰ํ•  ํ•จ์ˆ˜ (Drawer ์ปดํฌ๋„ŒํŠธ๋“ค ๋‹ค์Œ์— ์œ„์น˜)
610
  def execute_history_item(evt: gr.SelectData): # gr.SelectData๋กœ ์ด๋ฒคํŠธ ๋ฐ์ดํ„ฐ ๋ฐ›๊ธฐ
611
  try:
 
847
  close_btn.click(
848
  lambda: (gr.update(open=False), gr.HTML("")),
849
  outputs=[session_drawer, session_history]
 
 
 
 
 
 
 
850
  )
851
 
852
+
853
  btn.click(
854
  demo_instance.generation_code,
855
  inputs=[input, setting, history],