Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -490,6 +490,23 @@ def run(
|
|
490 |
pass
|
491 |
clear_cuda_cache()
|
492 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
493 |
|
494 |
##############################################################################
|
495 |
# Gradio UI
|
@@ -497,11 +514,12 @@ def run(
|
|
497 |
css = """
|
498 |
.gradio-container {
|
499 |
background: rgba(255, 255, 255, 0.7);
|
500 |
-
padding: 20px 30px;
|
501 |
-
margin:
|
502 |
width: 100% !important;
|
503 |
max-width: none !important;
|
504 |
min-height: 100vh;
|
|
|
505 |
}
|
506 |
.fillable {
|
507 |
width: 100% !important;
|
@@ -527,31 +545,46 @@ button, .btn {
|
|
527 |
button:hover, .btn:hover {
|
528 |
background: rgba(0, 0, 0, 0.05) !important;
|
529 |
}
|
530 |
-
.title
|
531 |
-
margin
|
532 |
-
padding:
|
533 |
-
text-align: center;
|
|
|
|
|
|
|
534 |
}
|
535 |
-
.title
|
536 |
-
margin: 0 0
|
537 |
-
|
538 |
-
font-
|
539 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
540 |
}
|
541 |
-
.title-
|
542 |
-
margin: 8px 0;
|
543 |
-
|
544 |
-
|
545 |
-
color: #4a5568;
|
|
|
|
|
546 |
}
|
547 |
"""
|
548 |
|
549 |
title_html = """
|
550 |
<h1 align="center" style="margin-bottom: 0.2em; font-size: 1.6em;"> 🤗 Gemma3-R1984-1B (Text-Only) </h1>
|
551 |
<p align="center" style="font-size:1.1em; color:#555;">
|
552 |
-
|
553 |
✅Document Processing (PDF, CSV, TXT) ✅Web Search Integration ✅Korean/English Support<br>
|
554 |
-
✅Running on Independent Local Server with 'NVIDIA
|
555 |
@Model Repository: VIDraft/Gemma-3-R1984-1B, @Based on: 'Google Gemma-3-1b'
|
556 |
</p>
|
557 |
"""
|
@@ -610,11 +643,17 @@ with gr.Blocks(css=css, title="Gemma3-R1984-1B") as demo:
|
|
610 |
web_search_text,
|
611 |
],
|
612 |
stop_btn=False,
|
|
|
|
|
|
|
|
|
613 |
css_paths=None,
|
614 |
delete_cache=(1800, 1800),
|
615 |
)
|
616 |
|
617 |
-
|
|
|
|
|
618 |
|
619 |
if __name__ == "__main__":
|
620 |
demo.launch()
|
|
|
490 |
pass
|
491 |
clear_cuda_cache()
|
492 |
|
493 |
+
##############################################################################
|
494 |
+
# 예시들 (텍스트 및 문서 파일만)
|
495 |
+
##############################################################################
|
496 |
+
examples = [
|
497 |
+
|
498 |
+
[
|
499 |
+
{
|
500 |
+
"text": "Please compare and analyze the content of these two PDF files.",
|
501 |
+
"files": [
|
502 |
+
"assets/additional-examples/before.pdf",
|
503 |
+
"assets/additional-examples/after.pdf",
|
504 |
+
],
|
505 |
+
}
|
506 |
+
],
|
507 |
+
|
508 |
+
|
509 |
+
]
|
510 |
|
511 |
##############################################################################
|
512 |
# Gradio UI
|
|
|
514 |
css = """
|
515 |
.gradio-container {
|
516 |
background: rgba(255, 255, 255, 0.7);
|
517 |
+
padding: 40px 30px 20px 30px !important;
|
518 |
+
margin: 0 auto !important;
|
519 |
width: 100% !important;
|
520 |
max-width: none !important;
|
521 |
min-height: 100vh;
|
522 |
+
box-sizing: border-box;
|
523 |
}
|
524 |
.fillable {
|
525 |
width: 100% !important;
|
|
|
545 |
button:hover, .btn:hover {
|
546 |
background: rgba(0, 0, 0, 0.05) !important;
|
547 |
}
|
548 |
+
.app-title {
|
549 |
+
margin: 0 0 30px 0 !important;
|
550 |
+
padding: 20px 0 !important;
|
551 |
+
text-align: center !important;
|
552 |
+
background: rgba(240, 248, 255, 0.8);
|
553 |
+
border-radius: 10px;
|
554 |
+
border: 1px solid #e0e6ed;
|
555 |
}
|
556 |
+
.app-title h1 {
|
557 |
+
margin: 0 0 15px 0 !important;
|
558 |
+
padding: 0 !important;
|
559 |
+
font-size: 2.2em !important;
|
560 |
+
font-weight: bold !important;
|
561 |
+
color: #1a365d !important;
|
562 |
+
line-height: 1.2 !important;
|
563 |
+
}
|
564 |
+
.app-title .features {
|
565 |
+
margin: 10px 0 !important;
|
566 |
+
padding: 0 !important;
|
567 |
+
font-size: 1.1em !important;
|
568 |
+
font-weight: 600 !important;
|
569 |
+
color: #2d3748 !important;
|
570 |
+
line-height: 1.4 !important;
|
571 |
}
|
572 |
+
.app-title .tech-info {
|
573 |
+
margin: 8px 0 0 0 !important;
|
574 |
+
padding: 0 !important;
|
575 |
+
font-size: 0.95em !important;
|
576 |
+
color: #4a5568 !important;
|
577 |
+
font-style: italic !important;
|
578 |
+
line-height: 1.3 !important;
|
579 |
}
|
580 |
"""
|
581 |
|
582 |
title_html = """
|
583 |
<h1 align="center" style="margin-bottom: 0.2em; font-size: 1.6em;"> 🤗 Gemma3-R1984-1B (Text-Only) </h1>
|
584 |
<p align="center" style="font-size:1.1em; color:#555;">
|
585 |
+
✅Agentic AI Platform ✅Reasoning & Analysis ✅Text Analysis ✅Deep Research & RAG <br>
|
586 |
✅Document Processing (PDF, CSV, TXT) ✅Web Search Integration ✅Korean/English Support<br>
|
587 |
+
✅Running on Independent Local Server with 'NVIDIA L40s / A100(ZeroGPU) GPU'<br>
|
588 |
@Model Repository: VIDraft/Gemma-3-R1984-1B, @Based on: 'Google Gemma-3-1b'
|
589 |
</p>
|
590 |
"""
|
|
|
643 |
web_search_text,
|
644 |
],
|
645 |
stop_btn=False,
|
646 |
+
title='<a href="https://discord.gg/openfreeai" target="_blank">https://discord.gg/openfreeai</a>',
|
647 |
+
examples=examples,
|
648 |
+
run_examples_on_click=False,
|
649 |
+
cache_examples=False,
|
650 |
css_paths=None,
|
651 |
delete_cache=(1800, 1800),
|
652 |
)
|
653 |
|
654 |
+
with gr.Row(elem_id="examples_row"):
|
655 |
+
with gr.Column(scale=12, elem_id="examples_container"):
|
656 |
+
gr.Markdown("### Example Inputs (Click to Load)")
|
657 |
|
658 |
if __name__ == "__main__":
|
659 |
demo.launch()
|