Commit
·
3a64edc
1
Parent(s):
e8281aa
fix: Add prompt_template input to push_dataset button handler
Browse files- Added push_prompt_template input field in Push to Hub tab
- Updated button click handler to include prompt_template in inputs list
- Fixes API endpoint parameter mismatch error
- Allows TraceMind-AI to call /run_push_dataset with prompt_template parameter
app.py
CHANGED
|
@@ -753,6 +753,15 @@ def create_gradio_ui():
|
|
| 753 |
value=False,
|
| 754 |
info="Private datasets are only visible to you"
|
| 755 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 756 |
push_button = gr.Button("📤 Push to HuggingFace Hub", variant="primary", size="lg")
|
| 757 |
|
| 758 |
with gr.Column():
|
|
@@ -789,7 +798,7 @@ def create_gradio_ui():
|
|
| 789 |
|
| 790 |
push_button.click(
|
| 791 |
fn=run_push_dataset,
|
| 792 |
-
inputs=[push_dataset_json, push_repo_name, push_hf_token, push_private],
|
| 793 |
outputs=[push_output]
|
| 794 |
)
|
| 795 |
|
|
|
|
| 753 |
value=False,
|
| 754 |
info="Private datasets are only visible to you"
|
| 755 |
)
|
| 756 |
+
# Hidden field for prompt template (used by API calls from TraceMind-AI)
|
| 757 |
+
push_prompt_template = gr.Textbox(
|
| 758 |
+
label="Prompt Template (Optional)",
|
| 759 |
+
placeholder="Leave empty if not using prompt template",
|
| 760 |
+
info="YAML prompt template to include in dataset card",
|
| 761 |
+
lines=5,
|
| 762 |
+
visible=True,
|
| 763 |
+
value=""
|
| 764 |
+
)
|
| 765 |
push_button = gr.Button("📤 Push to HuggingFace Hub", variant="primary", size="lg")
|
| 766 |
|
| 767 |
with gr.Column():
|
|
|
|
| 798 |
|
| 799 |
push_button.click(
|
| 800 |
fn=run_push_dataset,
|
| 801 |
+
inputs=[push_dataset_json, push_repo_name, push_hf_token, push_private, push_prompt_template],
|
| 802 |
outputs=[push_output]
|
| 803 |
)
|
| 804 |
|