Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -211,12 +211,17 @@ def respond(
|
|
211 |
def create_ui():
|
212 |
try:
|
213 |
css = """
|
|
|
|
|
|
|
|
|
214 |
footer {visibility: hidden;}
|
215 |
.output-group {
|
216 |
-
border: 1px solid #
|
217 |
border-radius: 5px;
|
218 |
padding: 10px;
|
219 |
margin-bottom: 20px;
|
|
|
220 |
}
|
221 |
.scroll-lock {
|
222 |
overflow-y: auto !important;
|
@@ -236,6 +241,8 @@ def create_ui():
|
|
236 |
white-space: pre !important;
|
237 |
word-wrap: normal !important;
|
238 |
height: 100% !important;
|
|
|
|
|
239 |
}
|
240 |
.code-box > div {
|
241 |
min-width: 100% !important;
|
@@ -245,13 +252,13 @@ def create_ui():
|
|
245 |
overflow-wrap: normal !important;
|
246 |
}
|
247 |
.tab-nav {
|
248 |
-
background-color: #
|
249 |
border-radius: 5px 5px 0 0;
|
250 |
overflow: hidden;
|
251 |
}
|
252 |
.tab-nav button {
|
253 |
-
color: #
|
254 |
-
background-color: #
|
255 |
border: none;
|
256 |
padding: 10px 20px;
|
257 |
margin: 0;
|
@@ -260,50 +267,53 @@ def create_ui():
|
|
260 |
font-weight: bold;
|
261 |
}
|
262 |
.tab-nav button:hover {
|
263 |
-
background-color: #
|
264 |
}
|
265 |
.tab-nav button.selected {
|
266 |
-
color: #
|
267 |
-
background-color: #
|
268 |
}
|
269 |
input[type="text"], textarea {
|
270 |
-
color: #
|
271 |
-
background-color: #
|
|
|
272 |
}
|
273 |
|
274 |
/* AI 코딩 탭의 Chatbot 스타일 수정 */
|
275 |
.chatbot, .chatbot *, .wrap, .wrap * {
|
276 |
-
color: #
|
|
|
277 |
}
|
278 |
.chatbot .message, .chatbot .user-message, .chatbot .bot-message {
|
279 |
-
color: #
|
280 |
padding: 10px 15px;
|
281 |
margin: 5px 0;
|
282 |
-
border-radius:
|
|
|
283 |
}
|
284 |
.chatbot .user-message {
|
285 |
-
border-left: 4px solid #
|
286 |
}
|
287 |
.chatbot .bot-message {
|
288 |
-
border-left: 4px solid #
|
289 |
}
|
290 |
.chatbot pre {
|
291 |
-
background-color: #
|
292 |
-
border: 1px solid #
|
293 |
border-radius: 4px;
|
294 |
padding: 10px;
|
295 |
overflow-x: auto;
|
296 |
-
color: #
|
297 |
}
|
298 |
.chatbot code {
|
299 |
-
background-color: #
|
300 |
padding: 2px 4px;
|
301 |
border-radius: 4px;
|
302 |
font-family: monospace;
|
303 |
-
color: #
|
304 |
}
|
305 |
.chatbot p, .chatbot span, .chatbot div {
|
306 |
-
color: #
|
307 |
margin: 5px 0;
|
308 |
}
|
309 |
.chatbot * {
|
@@ -311,37 +321,37 @@ def create_ui():
|
|
311 |
white-space: pre-wrap !important;
|
312 |
}
|
313 |
.chatbot h1, .chatbot h2, .chatbot h3, .chatbot h4, .chatbot h5, .chatbot h6 {
|
314 |
-
color: #
|
315 |
}
|
316 |
.chatbot a {
|
317 |
-
color: #
|
318 |
text-decoration: underline !important;
|
319 |
}
|
320 |
.chatbot ul, .chatbot ol {
|
321 |
-
color: #
|
322 |
padding-left: 20px !important;
|
323 |
}
|
324 |
.chatbot li {
|
325 |
margin-bottom: 5px !important;
|
326 |
-
color: #
|
327 |
}
|
328 |
.chatbot table {
|
329 |
border-collapse: collapse !important;
|
330 |
width: 100% !important;
|
331 |
}
|
332 |
.chatbot th, .chatbot td {
|
333 |
-
border: 1px solid #
|
334 |
padding: 8px !important;
|
335 |
text-align: left !important;
|
336 |
-
color: #
|
337 |
}
|
338 |
.chatbot th {
|
339 |
-
background-color: #
|
340 |
font-weight: bold !important;
|
341 |
}
|
342 |
"""
|
343 |
|
344 |
-
with gr.Blocks(
|
345 |
gr.Markdown("# Mouse: HuggingFace")
|
346 |
|
347 |
with gr.Tabs() as tabs:
|
|
|
211 |
def create_ui():
|
212 |
try:
|
213 |
css = """
|
214 |
+
body, .gradio-container {
|
215 |
+
background-color: #f8f9fa !important;
|
216 |
+
color: #333333 !important;
|
217 |
+
}
|
218 |
footer {visibility: hidden;}
|
219 |
.output-group {
|
220 |
+
border: 1px solid #dee2e6;
|
221 |
border-radius: 5px;
|
222 |
padding: 10px;
|
223 |
margin-bottom: 20px;
|
224 |
+
background-color: #ffffff;
|
225 |
}
|
226 |
.scroll-lock {
|
227 |
overflow-y: auto !important;
|
|
|
241 |
white-space: pre !important;
|
242 |
word-wrap: normal !important;
|
243 |
height: 100% !important;
|
244 |
+
background-color: #f8f9fa !important;
|
245 |
+
border: 1px solid #dee2e6 !important;
|
246 |
}
|
247 |
.code-box > div {
|
248 |
min-width: 100% !important;
|
|
|
252 |
overflow-wrap: normal !important;
|
253 |
}
|
254 |
.tab-nav {
|
255 |
+
background-color: #e9ecef;
|
256 |
border-radius: 5px 5px 0 0;
|
257 |
overflow: hidden;
|
258 |
}
|
259 |
.tab-nav button {
|
260 |
+
color: #495057 !important;
|
261 |
+
background-color: #e9ecef;
|
262 |
border: none;
|
263 |
padding: 10px 20px;
|
264 |
margin: 0;
|
|
|
267 |
font-weight: bold;
|
268 |
}
|
269 |
.tab-nav button:hover {
|
270 |
+
background-color: #dee2e6;
|
271 |
}
|
272 |
.tab-nav button.selected {
|
273 |
+
color: #212529 !important;
|
274 |
+
background-color: #ffffff;
|
275 |
}
|
276 |
input[type="text"], textarea {
|
277 |
+
color: #495057 !important;
|
278 |
+
background-color: #ffffff !important;
|
279 |
+
border: 1px solid #ced4da !important;
|
280 |
}
|
281 |
|
282 |
/* AI 코딩 탭의 Chatbot 스타일 수정 */
|
283 |
.chatbot, .chatbot *, .wrap, .wrap * {
|
284 |
+
color: #212529 !important;
|
285 |
+
background-color: #ffffff !important;
|
286 |
}
|
287 |
.chatbot .message, .chatbot .user-message, .chatbot .bot-message {
|
288 |
+
color: #212529 !important;
|
289 |
padding: 10px 15px;
|
290 |
margin: 5px 0;
|
291 |
+
border-radius: 5px;
|
292 |
+
background-color: #f8f9fa !important;
|
293 |
}
|
294 |
.chatbot .user-message {
|
295 |
+
border-left: 4px solid #28a745 !important;
|
296 |
}
|
297 |
.chatbot .bot-message {
|
298 |
+
border-left: 4px solid #007bff !important;
|
299 |
}
|
300 |
.chatbot pre {
|
301 |
+
background-color: #f1f3f5 !important;
|
302 |
+
border: 1px solid #dee2e6 !important;
|
303 |
border-radius: 4px;
|
304 |
padding: 10px;
|
305 |
overflow-x: auto;
|
306 |
+
color: #212529 !important;
|
307 |
}
|
308 |
.chatbot code {
|
309 |
+
background-color: #e9ecef !important;
|
310 |
padding: 2px 4px;
|
311 |
border-radius: 4px;
|
312 |
font-family: monospace;
|
313 |
+
color: #212529 !important;
|
314 |
}
|
315 |
.chatbot p, .chatbot span, .chatbot div {
|
316 |
+
color: #212529 !important;
|
317 |
margin: 5px 0;
|
318 |
}
|
319 |
.chatbot * {
|
|
|
321 |
white-space: pre-wrap !important;
|
322 |
}
|
323 |
.chatbot h1, .chatbot h2, .chatbot h3, .chatbot h4, .chatbot h5, .chatbot h6 {
|
324 |
+
color: #212529 !important;
|
325 |
}
|
326 |
.chatbot a {
|
327 |
+
color: #007bff !important;
|
328 |
text-decoration: underline !important;
|
329 |
}
|
330 |
.chatbot ul, .chatbot ol {
|
331 |
+
color: #212529 !important;
|
332 |
padding-left: 20px !important;
|
333 |
}
|
334 |
.chatbot li {
|
335 |
margin-bottom: 5px !important;
|
336 |
+
color: #212529 !important;
|
337 |
}
|
338 |
.chatbot table {
|
339 |
border-collapse: collapse !important;
|
340 |
width: 100% !important;
|
341 |
}
|
342 |
.chatbot th, .chatbot td {
|
343 |
+
border: 1px solid #dee2e6 !important;
|
344 |
padding: 8px !important;
|
345 |
text-align: left !important;
|
346 |
+
color: #212529 !important;
|
347 |
}
|
348 |
.chatbot th {
|
349 |
+
background-color: #e9ecef !important;
|
350 |
font-weight: bold !important;
|
351 |
}
|
352 |
"""
|
353 |
|
354 |
+
with gr.Blocks(css=css) as demo:
|
355 |
gr.Markdown("# Mouse: HuggingFace")
|
356 |
|
357 |
with gr.Tabs() as tabs:
|