Spaces:
Running on Zero
Running on Zero
More settings: a clear blue button with an icon and what it holds; developer views as vellum buttons
Browse files
app.py
CHANGED
|
@@ -178,7 +178,7 @@ TEXT = {
|
|
| 178 |
"question_ph": "For example: Which team should handle this?",
|
| 179 |
"choices_ph": "Billing: payments and refunds\nTechnical: bugs and outages\nSales: prices and contracts",
|
| 180 |
"choices": "Options", "choices_info": "One per line, or separated by commas. Leave empty for a yes/no answer.",
|
| 181 |
-
"settings": "
|
| 182 |
"modes": ("Off", "Auto", "On"), "off": "Off",
|
| 183 |
"unknown": "Allow “unknown”", "unknown_info": "Lets the model answer “unknown” when the text does not say.",
|
| 184 |
"coverage": "Answer set", "coverage_info": "Also lists the options that together contain the right answer with this probability.",
|
|
@@ -206,7 +206,7 @@ TEXT = {
|
|
| 206 |
"question_ph": "Örneğin: Bu talebi hangi ekip ele almalı?",
|
| 207 |
"choices_ph": "Fatura: ödemeler ve iadeler\nTeknik: hatalar ve kesintiler\nSatış: fiyatlar ve sözleşmeler",
|
| 208 |
"choices": "Seçenekler", "choices_info": "Her satıra bir tane ya da virgülle ayırarak yazın. Evet/hayır sorusu için boş bırakın.",
|
| 209 |
-
"settings": "
|
| 210 |
"modes": ("Kapalı", "Otomatik", "Açık"), "off": "Kapalı",
|
| 211 |
"unknown": "“Bilinmiyor” cevabına izin ver", "unknown_info": "Metin cevabı vermiyorsa model “bilinmiyor” diyebilir.",
|
| 212 |
"coverage": "Cevap kümesi", "coverage_info": "Doğru cevabı bu olasılıkla birlikte içeren seçenekleri de listeler.",
|
|
@@ -234,7 +234,7 @@ TEXT = {
|
|
| 234 |
"question_ph": "Zum Beispiel: Welches Team soll das bearbeiten?",
|
| 235 |
"choices_ph": "Abrechnung: Zahlungen und Erstattungen\nTechnik: Fehler und Ausfälle\nVertrieb: Preise und Verträge",
|
| 236 |
"choices": "Optionen", "choices_info": "Eine pro Zeile oder durch Kommas getrennt. Für eine Ja/Nein-Antwort leer lassen.",
|
| 237 |
-
"settings": "Einstellungen", "reasoning": "Nachdenken", "reasoning_info": "An: Das Modell denkt vor der Entscheidung nach. Automatisch: nur, wenn die Antwort unklar ist.",
|
| 238 |
"modes": ("Aus", "Automatisch", "An"), "off": "Aus",
|
| 239 |
"unknown": "„Unbekannt“ erlauben", "unknown_info": "Das Modell darf „unbekannt“ antworten, wenn der Text es nicht sagt.",
|
| 240 |
"coverage": "Antwortmenge", "coverage_info": "Nennt auch die Optionen, die zusammen die richtige Antwort mit dieser Wahrscheinlichkeit enthalten.",
|
|
@@ -529,6 +529,19 @@ footer { display: none !important; }
|
|
| 529 |
.gradio-container .game .tag2 { font-size: 26px; font-weight: 650; letter-spacing: -.02em; line-height: 1.12; color: #F5F1E8; margin: 8px 0 10px; }
|
| 530 |
.game .links a { color: #A9BFE6 !important; border-color: rgba(169,191,230,.35); }
|
| 531 |
.fine { font-size: 12px; color: var(--ink3); text-align: center; margin: 18px 0 8px; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 532 |
button.primary, .decide button { background: var(--lapis) !important; border-color: var(--lapis) !important; color: #fff !important; font-size: 17px !important; border-radius: 999px !important; min-height: 50px; }
|
| 533 |
button.primary:hover { background: #253D68 !important; }
|
| 534 |
"""
|
|
@@ -563,16 +576,16 @@ with gr.Blocks(title="JevAlt") as demo:
|
|
| 563 |
choices = gr.Textbox(first[3], label=T["choices"], info=T["choices_info"], placeholder=T["choices_ph"], lines=4, max_lines=14)
|
| 564 |
go = gr.Button(T["decide"], variant="primary", elem_classes="decide")
|
| 565 |
view = gr.HTML()
|
| 566 |
-
with gr.Accordion(T["settings"], open=False) as settings:
|
| 567 |
with gr.Row():
|
| 568 |
reasoning = gr.Radio(list(zip(T["modes"], MODES)), value=first[4], label=T["reasoning"], info=T["reasoning_info"])
|
| 569 |
abstain = gr.Checkbox(value=first[5], label=T["unknown"], info=T["unknown_info"])
|
| 570 |
coverage = gr.Radio(coverages("en"), value=first[6], label=T["coverage"], info=T["coverage_info"])
|
| 571 |
-
with gr.Accordion(T["dev"], open=False) as dev:
|
| 572 |
request = gr.Code(load_example("en", 0)[-1], language="json", label="JSON")
|
| 573 |
go_json = gr.Button(T["decide_json"], variant="secondary")
|
| 574 |
dev_note = gr.Markdown(T["dev_note"])
|
| 575 |
-
with gr.Accordion(T["raw"], open=False) as raw_box:
|
| 576 |
raw = gr.JSON(label="JSON")
|
| 577 |
bottom = gr.HTML(footer("en"))
|
| 578 |
|
|
|
|
| 178 |
"question_ph": "For example: Which team should handle this?",
|
| 179 |
"choices_ph": "Billing: payments and refunds\nTechnical: bugs and outages\nSales: prices and contracts",
|
| 180 |
"choices": "Options", "choices_info": "One per line, or separated by commas. Leave empty for a yes/no answer.",
|
| 181 |
+
"settings": "More settings: reasoning, “unknown”, answer set", "reasoning": "Reasoning", "reasoning_info": "On: the model thinks it through before it decides. Auto: only when the answer is unclear.",
|
| 182 |
"modes": ("Off", "Auto", "On"), "off": "Off",
|
| 183 |
"unknown": "Allow “unknown”", "unknown_info": "Lets the model answer “unknown” when the text does not say.",
|
| 184 |
"coverage": "Answer set", "coverage_info": "Also lists the options that together contain the right answer with this probability.",
|
|
|
|
| 206 |
"question_ph": "Örneğin: Bu talebi hangi ekip ele almalı?",
|
| 207 |
"choices_ph": "Fatura: ödemeler ve iadeler\nTeknik: hatalar ve kesintiler\nSatış: fiyatlar ve sözleşmeler",
|
| 208 |
"choices": "Seçenekler", "choices_info": "Her satıra bir tane ya da virgülle ayırarak yazın. Evet/hayır sorusu için boş bırakın.",
|
| 209 |
+
"settings": "Diğer ayarlar: düşünme, “bilinmiyor”, cevap kümesi", "reasoning": "Düşünme", "reasoning_info": "Açık: model karar vermeden önce düşünür. Otomatik: yalnızca cevap belirsizse.",
|
| 210 |
"modes": ("Kapalı", "Otomatik", "Açık"), "off": "Kapalı",
|
| 211 |
"unknown": "“Bilinmiyor” cevabına izin ver", "unknown_info": "Metin cevabı vermiyorsa model “bilinmiyor” diyebilir.",
|
| 212 |
"coverage": "Cevap kümesi", "coverage_info": "Doğru cevabı bu olasılıkla birlikte içeren seçenekleri de listeler.",
|
|
|
|
| 234 |
"question_ph": "Zum Beispiel: Welches Team soll das bearbeiten?",
|
| 235 |
"choices_ph": "Abrechnung: Zahlungen und Erstattungen\nTechnik: Fehler und Ausfälle\nVertrieb: Preise und Verträge",
|
| 236 |
"choices": "Optionen", "choices_info": "Eine pro Zeile oder durch Kommas getrennt. Für eine Ja/Nein-Antwort leer lassen.",
|
| 237 |
+
"settings": "Weitere Einstellungen: Nachdenken, „unbekannt“, Antwortmenge", "reasoning": "Nachdenken", "reasoning_info": "An: Das Modell denkt vor der Entscheidung nach. Automatisch: nur, wenn die Antwort unklar ist.",
|
| 238 |
"modes": ("Aus", "Automatisch", "An"), "off": "Aus",
|
| 239 |
"unknown": "„Unbekannt“ erlauben", "unknown_info": "Das Modell darf „unbekannt“ antworten, wenn der Text es nicht sagt.",
|
| 240 |
"coverage": "Antwortmenge", "coverage_info": "Nennt auch die Optionen, die zusammen die richtige Antwort mit dieser Wahrscheinlichkeit enthalten.",
|
|
|
|
| 529 |
.gradio-container .game .tag2 { font-size: 26px; font-weight: 650; letter-spacing: -.02em; line-height: 1.12; color: #F5F1E8; margin: 8px 0 10px; }
|
| 530 |
.game .links a { color: #A9BFE6 !important; border-color: rgba(169,191,230,.35); }
|
| 531 |
.fine { font-size: 12px; color: var(--ink3); text-align: center; margin: 18px 0 8px; }
|
| 532 |
+
/* Folds read as buttons: the settings in lapis with a sliders icon, the developer views in vellum. Closed, each is a plain
|
| 533 |
+
button on the page; open, its card comes back around the content. */
|
| 534 |
+
.gradio-container .acc-more.block, .gradio-container .acc-dev.block { padding: 0; background: transparent; box-shadow: none; }
|
| 535 |
+
.gradio-container .acc-more.block:has(> .label-wrap.open), .gradio-container .acc-dev.block:has(> .label-wrap.open) { padding: 10px; background: var(--card); }
|
| 536 |
+
.gradio-container .acc-more > button.label-wrap, .gradio-container .acc-dev > button.label-wrap { padding: 14px 18px; border-radius: 14px; text-align: left; gap: 12px; transition: background .2s; }
|
| 537 |
+
.gradio-container .acc-more > button.label-wrap { background: #DCE3EF; color: var(--lapis); }
|
| 538 |
+
.gradio-container .acc-more > button.label-wrap:hover { background: #C9D4E8; }
|
| 539 |
+
.gradio-container .acc-dev > button.label-wrap { background: var(--vellum); color: var(--ink2); }
|
| 540 |
+
.gradio-container .acc-dev > button.label-wrap:hover { background: #E2D9C6; }
|
| 541 |
+
.gradio-container .acc-more > button.label-wrap > span:first-child { display: inline-flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 650; }
|
| 542 |
+
.gradio-container .acc-dev > button.label-wrap > span:first-child { font-size: 15px; font-weight: 600; }
|
| 543 |
+
.gradio-container .acc-more > button.label-wrap .icon, .gradio-container .acc-dev > button.label-wrap .icon { color: inherit; font-size: 14px; }
|
| 544 |
+
.gradio-container .acc-more > button.label-wrap > span:first-child::before { content: ""; flex: none; width: 20px; height: 20px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 6h9M17 6h3M4 12h3M11 12h9M4 18h11M19 18h1'/%3E%3Ccircle cx='15' cy='6' r='2'/%3E%3Ccircle cx='9' cy='12' r='2'/%3E%3Ccircle cx='17' cy='18' r='2'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 6h9M17 6h3M4 12h3M11 12h9M4 18h11M19 18h1'/%3E%3Ccircle cx='15' cy='6' r='2'/%3E%3Ccircle cx='9' cy='12' r='2'/%3E%3Ccircle cx='17' cy='18' r='2'/%3E%3C/svg%3E") center / contain no-repeat; }
|
| 545 |
button.primary, .decide button { background: var(--lapis) !important; border-color: var(--lapis) !important; color: #fff !important; font-size: 17px !important; border-radius: 999px !important; min-height: 50px; }
|
| 546 |
button.primary:hover { background: #253D68 !important; }
|
| 547 |
"""
|
|
|
|
| 576 |
choices = gr.Textbox(first[3], label=T["choices"], info=T["choices_info"], placeholder=T["choices_ph"], lines=4, max_lines=14)
|
| 577 |
go = gr.Button(T["decide"], variant="primary", elem_classes="decide")
|
| 578 |
view = gr.HTML()
|
| 579 |
+
with gr.Accordion(T["settings"], open=False, elem_classes="acc-more") as settings:
|
| 580 |
with gr.Row():
|
| 581 |
reasoning = gr.Radio(list(zip(T["modes"], MODES)), value=first[4], label=T["reasoning"], info=T["reasoning_info"])
|
| 582 |
abstain = gr.Checkbox(value=first[5], label=T["unknown"], info=T["unknown_info"])
|
| 583 |
coverage = gr.Radio(coverages("en"), value=first[6], label=T["coverage"], info=T["coverage_info"])
|
| 584 |
+
with gr.Accordion(T["dev"], open=False, elem_classes="acc-dev") as dev:
|
| 585 |
request = gr.Code(load_example("en", 0)[-1], language="json", label="JSON")
|
| 586 |
go_json = gr.Button(T["decide_json"], variant="secondary")
|
| 587 |
dev_note = gr.Markdown(T["dev_note"])
|
| 588 |
+
with gr.Accordion(T["raw"], open=False, elem_classes="acc-dev") as raw_box:
|
| 589 |
raw = gr.JSON(label="JSON")
|
| 590 |
bottom = gr.HTML(footer("en"))
|
| 591 |
|