Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -142,7 +142,7 @@ with gr.Blocks(title="Task Caching Demo", theme=gr.themes.Default(font=[gr.theme
|
|
142 |
model_name_input = gr.Textbox(
|
143 |
label="SambaNova Model Name",
|
144 |
value="sambanova/DeepSeek-R1-Distill-Llama-70B", # Default value
|
145 |
-
info="Enter the SambaNova model name (e.g.,
|
146 |
)
|
147 |
# END OF ADDED PART
|
148 |
|
@@ -161,7 +161,7 @@ Solve for 24: 2 2 7 7
|
|
161 |
with gr.Tabs():
|
162 |
with gr.TabItem("1. Generate Cheatsheet (Task Caching)"):
|
163 |
gr.Markdown("Paste your training data below, one example per line. This data will be used to build a cumulative cheatsheet. The process may take some time depending on the number of examples.")
|
164 |
-
training_data_input = gr.Textbox(lines=10, label="Training Data",
|
165 |
generate_cheatsheet_button = gr.Button("Generate Cheatsheet (Task Caching)", variant="primary")
|
166 |
cheatsheet_output = gr.Textbox(label="Generated Cheatsheet", lines=15, interactive=False, show_label=True)
|
167 |
generate_cheatsheet_button.click(
|
@@ -173,12 +173,12 @@ Solve for 24: 2 2 7 7
|
|
173 |
|
174 |
with gr.TabItem("2. Test Inference"):
|
175 |
gr.Markdown("Enter your query below. The model will attempt to answer it twice: once using the generated cheatsheet (if any), and once without it.")
|
176 |
-
query_input = gr.Textbox(lines=3, label="Your Query",
|
177 |
get_answers_button = gr.Button("Get Answers", variant="primary")
|
178 |
|
179 |
with gr.Row():
|
180 |
-
answer_with_cheatsheet_output = gr.Textbox(label="Answer WITH
|
181 |
-
answer_without_cheatsheet_output = gr.Textbox(label="Answer WITHOUT
|
182 |
|
183 |
get_answers_button.click(
|
184 |
fn=get_answers_func,
|
|
|
142 |
model_name_input = gr.Textbox(
|
143 |
label="SambaNova Model Name",
|
144 |
value="sambanova/DeepSeek-R1-Distill-Llama-70B", # Default value
|
145 |
+
info="Enter the SambaNova model name (e.g., sambanova/DeepSeek-R1-Distill-Llama-70B). Ensure the 'sambanova/' prefix if required by litellm configuration."
|
146 |
)
|
147 |
# END OF ADDED PART
|
148 |
|
|
|
161 |
with gr.Tabs():
|
162 |
with gr.TabItem("1. Generate Cheatsheet (Task Caching)"):
|
163 |
gr.Markdown("Paste your training data below, one example per line. This data will be used to build a cumulative cheatsheet. The process may take some time depending on the number of examples.")
|
164 |
+
training_data_input = gr.Textbox(lines=10, label="Training Data", value=training_data_example)
|
165 |
generate_cheatsheet_button = gr.Button("Generate Cheatsheet (Task Caching)", variant="primary")
|
166 |
cheatsheet_output = gr.Textbox(label="Generated Cheatsheet", lines=15, interactive=False, show_label=True)
|
167 |
generate_cheatsheet_button.click(
|
|
|
173 |
|
174 |
with gr.TabItem("2. Test Inference"):
|
175 |
gr.Markdown("Enter your query below. The model will attempt to answer it twice: once using the generated cheatsheet (if any), and once without it.")
|
176 |
+
query_input = gr.Textbox(lines=3, label="Your Query", value="e.g., What is the solution to 5 6 6 8 in the Game of 24?")
|
177 |
get_answers_button = gr.Button("Get Answers", variant="primary")
|
178 |
|
179 |
with gr.Row():
|
180 |
+
answer_with_cheatsheet_output = gr.Textbox(label="Answer WITH Task Caching", lines=10, interactive=False, show_label=True)
|
181 |
+
answer_without_cheatsheet_output = gr.Textbox(label="Answer WITHOUT Task Caching", lines=10, interactive=False, show_label=True)
|
182 |
|
183 |
get_answers_button.click(
|
184 |
fn=get_answers_func,
|