Spaces:
Sleeping
Sleeping
Commit
·
06aef1b
1
Parent(s):
f43bdac
Fix all indentation errors in Gradio UI components
Browse files
app.py
CHANGED
|
@@ -791,55 +791,55 @@ def build_ui():
|
|
| 791 |
|
| 792 |
with gr.Row():
|
| 793 |
with gr.Column(scale=3):
|
| 794 |
-
|
| 795 |
-
|
| 796 |
-
|
| 797 |
-
|
| 798 |
-
|
| 799 |
-
|
| 800 |
-
|
| 801 |
-
|
| 802 |
-
|
| 803 |
-
|
| 804 |
-
|
| 805 |
-
|
| 806 |
-
|
| 807 |
-
|
| 808 |
-
|
| 809 |
-
|
| 810 |
-
|
| 811 |
-
|
| 812 |
-
|
| 813 |
-
|
| 814 |
-
|
| 815 |
-
|
| 816 |
-
|
| 817 |
-
|
| 818 |
-
|
| 819 |
-
|
| 820 |
-
|
| 821 |
-
|
| 822 |
-
|
| 823 |
-
|
| 824 |
-
|
| 825 |
-
|
| 826 |
-
|
| 827 |
-
|
| 828 |
-
|
| 829 |
-
|
| 830 |
-
|
| 831 |
-
|
| 832 |
-
|
| 833 |
-
|
| 834 |
-
|
| 835 |
-
|
| 836 |
-
|
| 837 |
-
|
| 838 |
|
| 839 |
generate_btn = gr.Button("Generate Router Plan", variant="primary")
|
| 840 |
clear_btn = gr.Button("Clear", variant="secondary")
|
| 841 |
|
| 842 |
-
|
| 843 |
raw_output = gr.Textbox(label="Raw Model Output", lines=12)
|
| 844 |
plan_json = gr.JSON(label="Parsed Router Plan")
|
| 845 |
validation_msg = gr.Markdown("Awaiting generation.")
|
|
|
|
| 791 |
|
| 792 |
with gr.Row():
|
| 793 |
with gr.Column(scale=3):
|
| 794 |
+
user_task = gr.Textbox(
|
| 795 |
+
label="User Task / Problem Statement",
|
| 796 |
+
placeholder="Describe the homework-style query that needs routing...",
|
| 797 |
+
lines=8,
|
| 798 |
+
value="Explain how to solve a constrained optimization homework problem that mixes calculus and coding steps.",
|
| 799 |
+
)
|
| 800 |
+
context = gr.Textbox(
|
| 801 |
+
label="Supporting Context (optional)",
|
| 802 |
+
placeholder="Paste any retrieved evidence, PDFs, or rubric notes.",
|
| 803 |
+
lines=4,
|
| 804 |
+
)
|
| 805 |
+
acceptance = gr.Textbox(
|
| 806 |
+
label="Acceptance Criteria",
|
| 807 |
+
placeholder="Bullet list of 'definition of done' checks.",
|
| 808 |
+
lines=3,
|
| 809 |
+
value="- Provide citations for every claim.\n- Ensure /math verifies /code output.",
|
| 810 |
+
)
|
| 811 |
+
extra_guidance = gr.Textbox(
|
| 812 |
+
label="Additional Guidance",
|
| 813 |
+
placeholder="Special constraints, tools to avoid, etc.",
|
| 814 |
+
lines=3,
|
| 815 |
+
)
|
| 816 |
+
with gr.Column(scale=2):
|
| 817 |
+
model_choice = gr.Dropdown(
|
| 818 |
+
label="Router Checkpoint",
|
| 819 |
+
choices=list(MODELS.keys()),
|
| 820 |
+
value=list(MODELS.keys())[0] if MODELS else None,
|
| 821 |
+
allow_custom_value=False,
|
| 822 |
+
)
|
| 823 |
+
difficulty = gr.Radio(
|
| 824 |
+
label="Difficulty Tier",
|
| 825 |
+
choices=["introductory", "intermediate", "advanced"],
|
| 826 |
+
value="advanced",
|
| 827 |
+
interactive=True,
|
| 828 |
+
)
|
| 829 |
+
tags = gr.Textbox(
|
| 830 |
+
label="Tags",
|
| 831 |
+
placeholder="Comma-separated e.g. calculus, optimization, python",
|
| 832 |
+
value="calculus, optimization, python",
|
| 833 |
+
)
|
| 834 |
+
max_new_tokens = gr.Slider(256, 20000, value=16000, step=32, label="Max New Tokens")
|
| 835 |
+
temperature = gr.Slider(0.0, 1.5, value=0.2, step=0.05, label="Temperature")
|
| 836 |
+
top_p = gr.Slider(0.1, 1.0, value=0.9, step=0.05, label="Top-p")
|
| 837 |
+
gpu_duration = gr.Slider(60, 1800, value=600, step=60, label="GPU Duration (seconds)", info="Maximum GPU time allocation for this request")
|
| 838 |
|
| 839 |
generate_btn = gr.Button("Generate Router Plan", variant="primary")
|
| 840 |
clear_btn = gr.Button("Clear", variant="secondary")
|
| 841 |
|
| 842 |
+
with gr.Row():
|
| 843 |
raw_output = gr.Textbox(label="Raw Model Output", lines=12)
|
| 844 |
plan_json = gr.JSON(label="Parsed Router Plan")
|
| 845 |
validation_msg = gr.Markdown("Awaiting generation.")
|