fix trim
Browse files- app.py +2 -2
- evaluation_logic.py +1 -1
app.py
CHANGED
@@ -13,12 +13,12 @@ with gr.Blocks() as demo:
|
|
13 |
model_name = gr.Textbox(label="Model Name (e.g., qwen/qwen-2.5-72b-instruct)")
|
14 |
prompt_format = gr.Dropdown(
|
15 |
label="Prompt Format",
|
16 |
-
choices=AVAILABLE_PROMPT_FORMATS,
|
17 |
value="duckdbinstgraniteshort"
|
18 |
)
|
19 |
start_btn = gr.Button("Start Evaluation")
|
20 |
output = gr.Textbox(label="Output", lines=20)
|
21 |
|
22 |
-
start_btn.click(fn=gradio_run_evaluation, inputs=[model_name, prompt_format], outputs=output)
|
23 |
|
24 |
demo.queue().launch()
|
|
|
13 |
model_name = gr.Textbox(label="Model Name (e.g., qwen/qwen-2.5-72b-instruct)")
|
14 |
prompt_format = gr.Dropdown(
|
15 |
label="Prompt Format",
|
16 |
+
choices=['duckdbinst', 'duckdbinstgraniteshort'], #AVAILABLE_PROMPT_FORMATS,
|
17 |
value="duckdbinstgraniteshort"
|
18 |
)
|
19 |
start_btn = gr.Button("Start Evaluation")
|
20 |
output = gr.Textbox(label="Output", lines=20)
|
21 |
|
22 |
+
start_btn.click(fn=gradio_run_evaluation, inputs=[model_name.strip(), prompt_format], outputs=output)
|
23 |
|
24 |
demo.queue().launch()
|
evaluation_logic.py
CHANGED
@@ -109,7 +109,7 @@ def run_evaluation(model_name, prompt_format="duckdbinstgraniteshort"):
|
|
109 |
yield f"Using model: {model_name}"
|
110 |
yield f"Using prompt format: {prompt_format}"
|
111 |
|
112 |
-
output_file = output_dir / f"{prompt_format}_0docs_{model_name.
|
113 |
|
114 |
# Ensure the output directory exists
|
115 |
output_dir.mkdir(parents=True, exist_ok=True)
|
|
|
109 |
yield f"Using model: {model_name}"
|
110 |
yield f"Using prompt format: {prompt_format}"
|
111 |
|
112 |
+
output_file = output_dir / f"{prompt_format}_0docs_{model_name.replace('/', '_')}_dev_{datetime.now().strftime('%y-%m-%d')}.json"
|
113 |
|
114 |
# Ensure the output directory exists
|
115 |
output_dir.mkdir(parents=True, exist_ok=True)
|