Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -98,14 +98,19 @@ def toggle_html_view(current_html, is_visible):
|
|
98 |
with gr.Blocks() as demo:
|
99 |
gr.Markdown("# ๐ ์ฌ๋ฌด์ ํ ๋ถ์ ์ฑ๋ด")
|
100 |
gr.Markdown("1. Document Parse API๋ก PDF ๋ฌธ์๋ฅผ HTML๋ก ๋ณํํฉ๋๋ค.\n"
|
101 |
-
"2. Solar LLM์ ํตํด ๋ฌธ์ ๊ธฐ๋ฐ ์ง๋ฌธ์
|
|
|
|
|
102 |
|
103 |
with gr.Row():
|
104 |
file_input = gr.File(label="๐ ์ฌ๋ฌด์ ํ ์
๋ก๋")
|
105 |
parse_btn = gr.Button("๋ฌธ์ HTML ๋ณํ")
|
106 |
|
107 |
-
html_output = gr.Textbox(label="๐ ๋ฌธ์ ๋ด์ฉ", lines=10, visible=True)
|
108 |
-
html_display = gr.HTML(visible=False)
|
|
|
|
|
|
|
109 |
toggle_html_btn = gr.Button("๐ HTML ๋ณด๊ธฐ ์ ํ")
|
110 |
html_visible_state = gr.State(False)
|
111 |
|
@@ -136,5 +141,18 @@ with gr.Blocks() as demo:
|
|
136 |
outputs=[chatbot, chat_state, user_question],
|
137 |
show_progress=True
|
138 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
|
140 |
demo.launch()
|
|
|
98 |
with gr.Blocks() as demo:
|
99 |
gr.Markdown("# ๐ ์ฌ๋ฌด์ ํ ๋ถ์ ์ฑ๋ด")
|
100 |
gr.Markdown("1. Document Parse API๋ก PDF ๋ฌธ์๋ฅผ HTML๋ก ๋ณํํฉ๋๋ค.\n"
|
101 |
+
"2. Solar LLM์ ํตํด ๋ฌธ์ ๊ธฐ๋ฐ ์ง๋ฌธ์ ๋ต๋ณํฉ๋๋ค.\n"
|
102 |
+
"์์ ํ์ผ์ Files ๋ฒํผ์ ํด๋ฆญํ๋ฉด ํ์ธ ๋ฐ ๋ค์ด๋ก๋ ๊ฐ๋ฅํฉ๋๋ค."
|
103 |
+
)
|
104 |
|
105 |
with gr.Row():
|
106 |
file_input = gr.File(label="๐ ์ฌ๋ฌด์ ํ ์
๋ก๋")
|
107 |
parse_btn = gr.Button("๋ฌธ์ HTML ๋ณํ")
|
108 |
|
109 |
+
# html_output = gr.Textbox(label="๐ ๋ฌธ์ ๋ด์ฉ", lines=10, visible=True)
|
110 |
+
# html_display = gr.HTML(visible=False)
|
111 |
+
html_output = gr.Textbox(label="๐ ๋ฌธ์ ๋ด์ฉ", lines=10, visible=True, elem_id="scrollable-html")
|
112 |
+
html_display = gr.HTML(visible=False, elem_id="scrollable-html-display")
|
113 |
+
|
114 |
toggle_html_btn = gr.Button("๐ HTML ๋ณด๊ธฐ ์ ํ")
|
115 |
html_visible_state = gr.State(False)
|
116 |
|
|
|
141 |
outputs=[chatbot, chat_state, user_question],
|
142 |
show_progress=True
|
143 |
)
|
144 |
+
demo.css = """
|
145 |
+
#scrollable-html, #scrollable-html-display {
|
146 |
+
max-height: 400px;
|
147 |
+
overflow: auto;
|
148 |
+
border: 1px solid #AEB3FA; /* Primary 30 */
|
149 |
+
padding: 16px;
|
150 |
+
background-color: #F4F4FF; /* Primary 10 */
|
151 |
+
border-radius: 12px;
|
152 |
+
font-family: 'Arial', sans-serif;
|
153 |
+
color: #2F22A4; /* Primary 60 */
|
154 |
+
box-shadow: 0 2px 6px rgba(128, 92, 251, 0.1); /* Ups Purple */
|
155 |
+
}
|
156 |
+
"""
|
157 |
|
158 |
demo.launch()
|