openfree commited on
Commit
1101d45
ยท
verified ยท
1 Parent(s): be99ee2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -92
app.py CHANGED
@@ -1812,98 +1812,7 @@ def create_main_interface():
1812
  with gr.Tab("๊ฐค๋Ÿฌ๋ฆฌ >", elem_id="gallery-tab"):
1813
  gr.HTML(value=get_user_spaces())
1814
 
1815
- # MOUSE ํƒญ
1816
- with gr.Tab("MOUSE > ", elem_id="mouse-tab", elem_classes="mouse-tab"):
1817
-
1818
- history = gr.State([])
1819
- setting = gr.State({
1820
- "system": SystemPrompt,
1821
- })
1822
-
1823
- with ms.Application() as app:
1824
- with antd.ConfigProvider():
1825
- # Drawer ์ปดํฌ๋„ŒํŠธ๋“ค
1826
- with antd.Drawer(open=False, title="code", placement="left", width="750px") as code_drawer:
1827
- code_output = legacy.Markdown()
1828
-
1829
- with antd.Drawer(open=False, title="history", placement="left", width="900px") as history_drawer:
1830
- history_output = legacy.Chatbot(show_label=False, flushing=False, height=960, elem_classes="history_chatbot")
1831
-
1832
- with antd.Drawer(
1833
- open=False,
1834
- title="Templates",
1835
- placement="right",
1836
- width="900px",
1837
- elem_classes="session-drawer"
1838
- ) as session_drawer:
1839
- with antd.Flex(vertical=True, gap="middle"):
1840
- gr.Markdown("### Available Templates")
1841
- session_history = gr.HTML(
1842
- elem_classes="session-history"
1843
- )
1844
- close_btn = antd.Button(
1845
- "Close",
1846
- type="default",
1847
- elem_classes="close-btn"
1848
- )
1849
-
1850
- # ๋ฉ”์ธ ์ปจํ…์ธ ๋ฅผ ์œ„ํ•œ Row
1851
- with antd.Row(gutter=[32, 12]) as layout:
1852
- # ์ขŒ์ธก ํŒจ๋„
1853
- with antd.Col(span=24, md=8):
1854
- with antd.Flex(vertical=True, gap="middle", wrap=True):
1855
- # ํ—ค๋” ๋ถ€๋ถ„
1856
- header = gr.HTML(f"""
1857
- <div class="left_header">
1858
- <img src="data:image/gif;base64,{get_image_base64('mouse.gif')}" width="360px" />
1859
- <h1 style="font-size: 18px;">๊ณ ์–‘์ด๋„ ๋ฐœ๋กœ ์ฝ”๋”ฉํ•˜๋Š” 'MOUSE-I'</h2>
1860
- <h1 style="font-size: 10px;">ํ…œํ”Œ๋ฆฟ์˜ ํ”„๋กฌํ”„ํŠธ๋ฅผ ๋ณต์‚ฌํ•˜์—ฌ ๋ถ™์—ฌ๋„ฃ๊ณ  Send ํด๋ฆญ์‹œ ์ž๋™์œผ๋กœ ์ฝ”๋“œ๊ฐ€ ์ƒ์„ฑ๋ฉ๋‹ˆ๋‹ค. ์ƒ์„ฑ ๊ฒฐ๊ณผ๋ฅผ ํ™•์ธ ๋ฐฐํฌํ•˜๊ธฐ ํด๋ฆญ์‹œ ๊ธ€๋กœ๋ฒŒ ํฌ๋ผ์šฐ๋“œ Vercel์„ ํ†ตํ•ด ์›น์„œ๋น„์Šค๊ฐ€ ๋ฐฐํฌ๋ฉ๋‹ˆ๋‹ค. ์ƒ์„ฑ๋œ ์ฝ”๋“œ๋งŒ ํ”„๋กฌํ”„ํŠธ์— ๋ถ™์—ฌ๋„ฃ๊ณ  'Code ์‹คํ–‰' ๋ฒ„ํŠผ ํด๋ฆญ์‹œ ํ™”๋ฉด์— ์ฆ‰์‹œ ์„œ๋น„์Šค๊ฐ€ ์‹คํ–‰. ๋ฌธ์˜: arxivgpt@gmail.com</h1>
1861
- <h1 style="font-size: 12px; margin-top: 10px;">
1862
- <a href="https://openfree-mouse.hf.space" target="_blank" style="color: #0084ff; text-decoration: none; transition: color 0.3s;">
1863
- ๐ŸŽจ [HOME] MOUSE๋กœ ์ƒ์„ฑํ•œ ์›น์•ฑ ๊ณต๊ฐœ ๊ฐค๋Ÿฌ๋ฆฌ ๋ฐ”๋กœ๊ฐ€๊ธฐ ํด๋ฆญ
1864
- </a>
1865
- </h1>
1866
- </div>
1867
- """)
1868
- # ์ž…๋ ฅ ์˜์—ญ
1869
- input = antd.InputTextarea(
1870
- size="large",
1871
- allow_clear=True,
1872
- placeholder=random.choice(DEMO_LIST)['description']
1873
- )
1874
-
1875
-
1876
- # ๋ฒ„ํŠผ ๊ทธ๋ฃน
1877
- with antd.Flex(gap="small", justify="space-between"):
1878
- btn = antd.Button("Send", type="primary", size="large")
1879
- boost_btn = antd.Button("Boost", type="default", size="large")
1880
- execute_btn = antd.Button("Code์‹คํ–‰", type="default", size="large")
1881
- deploy_btn = antd.Button("๋ฐฐํฌ", type="default", size="large")
1882
- clear_btn = antd.Button("ํด๋ฆฌ์–ด", type="default", size="large")
1883
-
1884
- deploy_result = gr.HTML(label="๋ฐฐํฌ ๊ฒฐ๊ณผ")
1885
-
1886
- # ์šฐ์ธก ํŒจ๋„
1887
- with antd.Col(span=24, md=16):
1888
- with ms.Div(elem_classes="right_panel"):
1889
- # ์ƒ๋‹จ ๋ฒ„ํŠผ๋“ค
1890
- with antd.Flex(gap="small", elem_classes="setting-buttons"):
1891
- codeBtn = antd.Button("๐Ÿง‘โ€๐Ÿ’ป ์ฝ”๋“œ ๋ณด๊ธฐ", type="default")
1892
- historyBtn = antd.Button("๐Ÿ“œ ํžˆ์Šคํ† ๋ฆฌ", type="default")
1893
- best_btn = antd.Button("๐Ÿ† ๋ฒ ์ŠคํŠธ ํ…œํ”Œ๋ฆฟ", type="default")
1894
- trending_btn = antd.Button("๐Ÿ”ฅ ํŠธ๋ Œ๋”ฉ ํ…œํ”Œ๋ฆฟ", type="default")
1895
- new_btn = antd.Button("โœจ NEW ํ…œํ”Œ๋ฆฟ", type="default")
1896
-
1897
- gr.HTML('<div class="render_header"><span class="header_btn"></span><span class="header_btn"></span><span class="header_btn"></span></div>')
1898
-
1899
- # ํƒญ ์ปจํ…์ธ 
1900
- with antd.Tabs(active_key="empty", render_tab_bar="() => null") as state_tab:
1901
- with antd.Tabs.Item(key="empty"):
1902
- empty = antd.Empty(description="empty input", elem_classes="right_content")
1903
- with antd.Tabs.Item(key="loading"):
1904
- loading = antd.Spin(True, tip="coding...", size="large", elem_classes="right_content")
1905
- with antd.Tabs.Item(key="render"):
1906
- sandbox = gr.HTML(elem_classes="html_content")
1907
 
1908
  # ์ด๋ฒคํŠธ ํ•ธ๋“ค๋Ÿฌ ์—ฐ๊ฒฐ
1909
  execute_btn.click(
 
1812
  with gr.Tab("๊ฐค๋Ÿฌ๋ฆฌ >", elem_id="gallery-tab"):
1813
  gr.HTML(value=get_user_spaces())
1814
 
1815
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1816
 
1817
  # ์ด๋ฒคํŠธ ํ•ธ๋“ค๋Ÿฌ ์—ฐ๊ฒฐ
1818
  execute_btn.click(