Spaces:
Building
Building
Update app.py
Browse files
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 |
-
|
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(
|