Update app.py
Browse files
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 |
-
|
|
|
|
|
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],
|