Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -192,53 +192,65 @@ def respond(message: str, chat_history: List[Dict[str, str]], max_tokens: int, t
|
|
192 |
|
193 |
def create_ui():
|
194 |
try:
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
242 |
|
243 |
with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css) as demo:
|
244 |
gr.Markdown("# Mouse: HuggingFace")
|
@@ -268,12 +280,21 @@ def create_ui():
|
|
268 |
with code_tabs:
|
269 |
app_py_tab = gr.TabItem("app.py")
|
270 |
with app_py_tab:
|
271 |
-
app_py_content = gr.Code(
|
|
|
|
|
|
|
|
|
|
|
272 |
requirements_tab = gr.TabItem("requirements.txt")
|
273 |
with requirements_tab:
|
274 |
-
|
275 |
-
|
276 |
-
|
|
|
|
|
|
|
|
|
277 |
|
278 |
with gr.TabItem("AI 코딩"):
|
279 |
chatbot = gr.Chatbot(label="대화")
|
|
|
192 |
|
193 |
def create_ui():
|
194 |
try:
|
195 |
+
css = """
|
196 |
+
footer {visibility: hidden;}
|
197 |
+
.output-group {
|
198 |
+
border: 1px solid #ddd;
|
199 |
+
border-radius: 5px;
|
200 |
+
padding: 10px;
|
201 |
+
margin-bottom: 20px;
|
202 |
+
}
|
203 |
+
.scroll-lock {
|
204 |
+
overflow-y: auto !important;
|
205 |
+
max-height: calc((100vh - 200px) / 5) !important;
|
206 |
+
}
|
207 |
+
.tree-view-scroll {
|
208 |
+
overflow-y: auto !important;
|
209 |
+
max-height: calc((100vh - 200px) / 2) !important;
|
210 |
+
}
|
211 |
+
.full-height {
|
212 |
+
height: calc(100vh - 200px) !important;
|
213 |
+
overflow-y: auto !important;
|
214 |
+
}
|
215 |
+
.code-box {
|
216 |
+
overflow-x: auto !important;
|
217 |
+
white-space: pre !important;
|
218 |
+
word-wrap: normal !important;
|
219 |
+
}
|
220 |
+
.code-box > div {
|
221 |
+
min-width: 100% !important;
|
222 |
+
}
|
223 |
+
.code-box > div > textarea {
|
224 |
+
word-break: normal !important;
|
225 |
+
overflow-wrap: normal !important;
|
226 |
+
}
|
227 |
+
.tab-nav {
|
228 |
+
background-color: #2c3e50;
|
229 |
+
border-radius: 5px 5px 0 0;
|
230 |
+
overflow: hidden;
|
231 |
+
}
|
232 |
+
.tab-nav button {
|
233 |
+
color: #ecf0f1 !important;
|
234 |
+
background-color: #34495e;
|
235 |
+
border: none;
|
236 |
+
padding: 10px 20px;
|
237 |
+
margin: 0;
|
238 |
+
transition: background-color 0.3s;
|
239 |
+
font-size: 16px;
|
240 |
+
font-weight: bold;
|
241 |
+
}
|
242 |
+
.tab-nav button:hover {
|
243 |
+
background-color: #2980b9;
|
244 |
+
}
|
245 |
+
.tab-nav button.selected {
|
246 |
+
color: #2c3e50 !important;
|
247 |
+
background-color: #ecf0f1;
|
248 |
+
}
|
249 |
+
input[type="text"], textarea {
|
250 |
+
color: #2c3e50 !important;
|
251 |
+
background-color: #ecf0f1 !important;
|
252 |
+
}
|
253 |
+
"""
|
254 |
|
255 |
with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css) as demo:
|
256 |
gr.Markdown("# Mouse: HuggingFace")
|
|
|
280 |
with code_tabs:
|
281 |
app_py_tab = gr.TabItem("app.py")
|
282 |
with app_py_tab:
|
283 |
+
app_py_content = gr.Code(
|
284 |
+
language="python",
|
285 |
+
label="app.py",
|
286 |
+
lines=30,
|
287 |
+
elem_classes="full-height code-box"
|
288 |
+
)
|
289 |
requirements_tab = gr.TabItem("requirements.txt")
|
290 |
with requirements_tab:
|
291 |
+
requirements_content = gr.Code(
|
292 |
+
language="text",
|
293 |
+
label="requirements.txt",
|
294 |
+
lines=30,
|
295 |
+
elem_classes="full-height code-box"
|
296 |
+
)
|
297 |
+
|
298 |
|
299 |
with gr.TabItem("AI 코딩"):
|
300 |
chatbot = gr.Chatbot(label="대화")
|