Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -410,31 +410,158 @@ custom_theme = gr.themes.Soft(
|
|
410 |
)
|
411 |
|
412 |
custom_css = """
|
413 |
-
body, html {
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
.
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
.gr-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
438 |
"""
|
439 |
|
440 |
with gr.Blocks(theme=custom_theme, css=custom_css, title="AI Research Agent") as demo:
|
|
|
410 |
)
|
411 |
|
412 |
custom_css = """
|
413 |
+
body, html {
|
414 |
+
margin: 0 !important;
|
415 |
+
padding: 0.5em !important;
|
416 |
+
height: 100%;
|
417 |
+
background: linear-gradient(to bottom right, #2c3e50, #34495e);
|
418 |
+
color: #ecf0f1;
|
419 |
+
font-family: 'Inter', 'System UI', sans-serif;
|
420 |
+
}
|
421 |
+
.gradio-container {
|
422 |
+
background: transparent !important;
|
423 |
+
max-width: 100% !important;
|
424 |
+
padding: 2em 1em 1em 1em !important;
|
425 |
+
box-sizing: border-box;
|
426 |
+
min-height: 100vh;
|
427 |
+
display: flex;
|
428 |
+
flex-direction: column;
|
429 |
+
overflow-y: auto !important;
|
430 |
+
}
|
431 |
+
.gr-block.gr-group, .gr-tabs, .gr-accordion {
|
432 |
+
background-color: rgba(44, 62, 80, 0.85) !important;
|
433 |
+
border: 1px solid rgba(189, 195, 199, 0.2) !important;
|
434 |
+
border-radius: 8px !important;
|
435 |
+
box-shadow: 0 3px 5px rgba(0,0,0,0.15);
|
436 |
+
margin-bottom: 1em;
|
437 |
+
}
|
438 |
+
.gr-tabitem {
|
439 |
+
background-color: rgba(52, 73, 94, 0.8) !important;
|
440 |
+
border-radius: 6px !important;
|
441 |
+
padding: 1em !important;
|
442 |
+
border: 1px solid rgba(189, 195, 199, 0.1) !important;
|
443 |
+
}
|
444 |
+
.gr-textbox, .gr-dropdown, .gr-button, .gr-code, .gr-chat-message, .gr-json, .gr-file input[type="file"], .gr-file .OgniCn {
|
445 |
+
border: 1px solid rgba(189, 195, 199, 0.3) !important;
|
446 |
+
background-color: rgba(52, 73, 94, 0.9) !important;
|
447 |
+
color: #ecf0f1 !important;
|
448 |
+
border-radius: 6px !important;
|
449 |
+
}
|
450 |
+
.gr-file {
|
451 |
+
background-color: transparent !important;
|
452 |
+
border: none !important;
|
453 |
+
padding: 0 !important;
|
454 |
+
}
|
455 |
+
.gr-file > .label-text {
|
456 |
+
color: #bdc3c7 !important;
|
457 |
+
}
|
458 |
+
.gr-textarea textarea, .gr-textbox input {
|
459 |
+
color: #ecf0f1 !important;
|
460 |
+
}
|
461 |
+
.gr-button.gr-button-primary {
|
462 |
+
background-color: #1abc9c !important;
|
463 |
+
color: white !important;
|
464 |
+
border-color: #16a085 !important;
|
465 |
+
}
|
466 |
+
.gr-button.gr-button-secondary {
|
467 |
+
background-color: #9b59b6 !important;
|
468 |
+
color: white !important;
|
469 |
+
border-color: #8e44ad !important;
|
470 |
+
}
|
471 |
+
.gr-button.gr-button-stop {
|
472 |
+
background-color: #e74c3c !important;
|
473 |
+
color: white !important;
|
474 |
+
border-color: #c0392b !important;
|
475 |
+
}
|
476 |
+
.gr-markdown {
|
477 |
+
padding: 0px;
|
478 |
+
}
|
479 |
+
.gr-markdown h1, .gr-markdown h2, .gr-markdown h3 {
|
480 |
+
color: #1abc9c !important;
|
481 |
+
border-bottom: 1px solid rgba(189, 195, 199, 0.2) !important;
|
482 |
+
padding-bottom: 0.3em;
|
483 |
+
margin-top: 0.8em;
|
484 |
+
margin-bottom: 0.6em;
|
485 |
+
}
|
486 |
+
.gr-markdown p, .gr-markdown li {
|
487 |
+
color: #ecf0f1 !important;
|
488 |
+
line-height: 1.6;
|
489 |
+
}
|
490 |
+
.gr-markdown pre code {
|
491 |
+
background-color: rgba(30, 40, 50, 0.95) !important;
|
492 |
+
border: 1px solid rgba(189, 195, 199, 0.3) !important;
|
493 |
+
color: #ecf0f1;
|
494 |
+
border-radius: 4px;
|
495 |
+
padding: 0.8em;
|
496 |
+
}
|
497 |
+
.gr-chatbot {
|
498 |
+
background-color: rgba(44, 62, 80, 0.7) !important;
|
499 |
+
border: 1px solid rgba(189, 195, 199, 0.2) !important;
|
500 |
+
}
|
501 |
+
.gr-chatbot .message {
|
502 |
+
background-color: rgba(52, 73, 94, 0.9) !important;
|
503 |
+
color: #ecf0f1 !important;
|
504 |
+
border: 1px solid rgba(189, 195, 199, 0.2) !important;
|
505 |
+
box-shadow: 0 1px 2px rgba(0,0,0,0.1) !important;
|
506 |
+
}
|
507 |
+
.gr-chatbot .message.user {
|
508 |
+
background-color: rgba(46, 204, 113, 0.8) !important;
|
509 |
+
color: #2c3e50 !important;
|
510 |
+
}
|
511 |
+
.gr-input-label > .label-text, .gr-dropdown-label > .label-text, .gr-checkbox-label > .label-text {
|
512 |
+
color: #bdc3c7 !important;
|
513 |
+
font-size: 0.9rem !important;
|
514 |
+
margin-bottom: 0.2rem !important;
|
515 |
+
}
|
516 |
+
.gr-info {
|
517 |
+
color: #bdc3c7 !important;
|
518 |
+
font-size: 0.85rem !important;
|
519 |
+
}
|
520 |
+
.status-bar {
|
521 |
+
background-color: rgba(44, 62, 80, 0.8) !important;
|
522 |
+
padding: 0.5rem 1rem !important;
|
523 |
+
border-radius: 6px;
|
524 |
+
margin: 1rem 0 !important;
|
525 |
+
}
|
526 |
+
.tabnav button {
|
527 |
+
background-color: rgba(52, 73, 94, 0.8) !important;
|
528 |
+
color: #ecf0f1 !important;
|
529 |
+
border-bottom: 2px solid transparent !important;
|
530 |
+
border-top-left-radius: 6px !important;
|
531 |
+
border-top-right-radius: 6px !important;
|
532 |
+
margin-right: 2px !important;
|
533 |
+
padding: 0.5em 1em !important;
|
534 |
+
}
|
535 |
+
.tabnav button.selected {
|
536 |
+
background-color: rgba(44, 62, 80, 0.95) !important;
|
537 |
+
color: #1abc9c !important;
|
538 |
+
border-bottom: 2px solid #1abc9c !important;
|
539 |
+
}
|
540 |
+
.main-title {
|
541 |
+
text-align: center;
|
542 |
+
margin: 1.5rem 0 0.5rem 0 !important;
|
543 |
+
}
|
544 |
+
.main-subtitle {
|
545 |
+
text-align: center;
|
546 |
+
color: #bdc3c7;
|
547 |
+
font-size: 0.95rem;
|
548 |
+
margin: 0 0 1.5rem 0 !important;
|
549 |
+
}
|
550 |
+
@media (max-width: 768px) {
|
551 |
+
.gradio-container {
|
552 |
+
padding: 1.5em 0.5em !important;
|
553 |
+
}
|
554 |
+
.main-title {
|
555 |
+
font-size: 1.5rem !important;
|
556 |
+
margin-top: 1rem !important;
|
557 |
+
}
|
558 |
+
.main-subtitle {
|
559 |
+
font-size: 0.85rem !important;
|
560 |
+
}
|
561 |
+
.status-bar {
|
562 |
+
margin: 0.5rem 0 !important;
|
563 |
+
}
|
564 |
+
}
|
565 |
"""
|
566 |
|
567 |
with gr.Blocks(theme=custom_theme, css=custom_css, title="AI Research Agent") as demo:
|