Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
"""
|
| 2 |
-
Darwin-
|
| 3 |
-
Diagnostic-Guided
|
| 4 |
"""
|
| 5 |
import sys
|
| 6 |
print(f"[BOOT] Python {sys.version}", flush=True)
|
|
@@ -42,15 +42,15 @@ from transformers.generation.streamers import TextIteratorStreamer
|
|
| 42 |
|
| 43 |
|
| 44 |
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 45 |
-
# 1. MODEL CONFIG β Darwin-
|
| 46 |
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 47 |
-
MODEL_ID = "FINAL-Bench/Darwin-
|
| 48 |
-
MODEL_BASE = "google/gemma-4-
|
| 49 |
-
MODEL_NAME = "Darwin-
|
| 50 |
-
MODEL_DESC = "Gemma 4
|
| 51 |
MODEL_INFO = {
|
| 52 |
-
"arch": "
|
| 53 |
-
"ctx": "
|
| 54 |
}
|
| 55 |
|
| 56 |
MODELS = {
|
|
@@ -64,7 +64,7 @@ MODELS = {
|
|
| 64 |
DEFAULT_MODEL = MODEL_NAME
|
| 65 |
|
| 66 |
PRESETS = {
|
| 67 |
-
"general": "You are Darwin-
|
| 68 |
"code": "You are an expert software engineer. Write clean, efficient, well-commented code. Explain your approach before writing. Use modern best practices.",
|
| 69 |
"math": "You are a world-class mathematician. Break problems step-by-step. Show full working. Use LaTeX where helpful.",
|
| 70 |
"creative": "You are a brilliant creative writer. Be imaginative, vivid, and engaging. Adapt tone and style to the request.",
|
|
@@ -331,10 +331,10 @@ def _model_info_html(name):
|
|
| 331 |
f'</div></div>'
|
| 332 |
)
|
| 333 |
|
| 334 |
-
with gr.Blocks(title="Darwin-
|
| 335 |
|
| 336 |
with gr.Row():
|
| 337 |
-
gr.Markdown("## 𧬠Darwin-
|
| 338 |
with gr.Column(scale=0, min_width=120):
|
| 339 |
gr.LoginButton(size="sm")
|
| 340 |
|
|
@@ -357,7 +357,7 @@ with gr.Blocks(title="Darwin-31B-Opus") as demo:
|
|
| 357 |
chatbot = gr.Chatbot(elem_id="chatbot", show_label=False, height=600)
|
| 358 |
with gr.Row():
|
| 359 |
chat_input = gr.Textbox(
|
| 360 |
-
placeholder="Message Darwin-
|
| 361 |
show_label=False, scale=7, autofocus=True, lines=1, max_lines=4,
|
| 362 |
)
|
| 363 |
send_btn = gr.Button("β", variant="primary", scale=0, min_width=48, elem_id="send-btn")
|
|
@@ -389,5 +389,5 @@ with gr.Blocks(title="Darwin-31B-Opus") as demo:
|
|
| 389 |
# 7. LAUNCH
|
| 390 |
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 391 |
if __name__ == "__main__":
|
| 392 |
-
print(f"[BOOT] Darwin-
|
| 393 |
demo.launch(server_name="0.0.0.0", server_port=7860, css=CSS, ssr_mode=False)
|
|
|
|
| 1 |
"""
|
| 2 |
+
Darwin-4B-Opus β Demo Space
|
| 3 |
+
Diagnostic-Guided DARE-TIES Merge Β· Gemma 4 E4B Β· Thinking Mode Β· Vision
|
| 4 |
"""
|
| 5 |
import sys
|
| 6 |
print(f"[BOOT] Python {sys.version}", flush=True)
|
|
|
|
| 42 |
|
| 43 |
|
| 44 |
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 45 |
+
# 1. MODEL CONFIG β Darwin-4B-Opus (Single Model)
|
| 46 |
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 47 |
+
MODEL_ID = "FINAL-Bench/Darwin-4B-Opus"
|
| 48 |
+
MODEL_BASE = "google/gemma-4-E4B-it" # processor/tokenizer source
|
| 49 |
+
MODEL_NAME = "Darwin-4B-Opus"
|
| 50 |
+
MODEL_DESC = "Gemma 4 E4B + Claude Opus Distill β Darwin V6 DARE-TIES evolutionary merge"
|
| 51 |
MODEL_INFO = {
|
| 52 |
+
"arch": "MoE", "total": "4B", "active": "4B",
|
| 53 |
+
"ctx": "128K", "vision": True,
|
| 54 |
}
|
| 55 |
|
| 56 |
MODELS = {
|
|
|
|
| 64 |
DEFAULT_MODEL = MODEL_NAME
|
| 65 |
|
| 66 |
PRESETS = {
|
| 67 |
+
"general": "You are Darwin-4B-Opus, a reasoning-enhanced AI assistant created by VIDRAFT using diagnostic-guided DARE-TIES evolutionary merge. Think step by step for complex questions.",
|
| 68 |
"code": "You are an expert software engineer. Write clean, efficient, well-commented code. Explain your approach before writing. Use modern best practices.",
|
| 69 |
"math": "You are a world-class mathematician. Break problems step-by-step. Show full working. Use LaTeX where helpful.",
|
| 70 |
"creative": "You are a brilliant creative writer. Be imaginative, vivid, and engaging. Adapt tone and style to the request.",
|
|
|
|
| 331 |
f'</div></div>'
|
| 332 |
)
|
| 333 |
|
| 334 |
+
with gr.Blocks(title="Darwin-4B-Opus") as demo:
|
| 335 |
|
| 336 |
with gr.Row():
|
| 337 |
+
gr.Markdown("## 𧬠Darwin-4B-Opus\nVIDRAFT · DARE-TIES Evolutionary Merge · Apache 2.0 · Vision · Thinking")
|
| 338 |
with gr.Column(scale=0, min_width=120):
|
| 339 |
gr.LoginButton(size="sm")
|
| 340 |
|
|
|
|
| 357 |
chatbot = gr.Chatbot(elem_id="chatbot", show_label=False, height=600)
|
| 358 |
with gr.Row():
|
| 359 |
chat_input = gr.Textbox(
|
| 360 |
+
placeholder="Message Darwin-4B-Opusβ¦",
|
| 361 |
show_label=False, scale=7, autofocus=True, lines=1, max_lines=4,
|
| 362 |
)
|
| 363 |
send_btn = gr.Button("β", variant="primary", scale=0, min_width=48, elem_id="send-btn")
|
|
|
|
| 389 |
# 7. LAUNCH
|
| 390 |
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 391 |
if __name__ == "__main__":
|
| 392 |
+
print(f"[BOOT] Darwin-4B-Opus Playground Β· VIDRAFT", flush=True)
|
| 393 |
demo.launch(server_name="0.0.0.0", server_port=7860, css=CSS, ssr_mode=False)
|