Spaces:
Running
Running
Better feedback upon successful commit
Browse files
app.py
CHANGED
|
@@ -746,6 +746,7 @@ You can freely edit and test GGUF chat template(s) (and are encouraged to do so)
|
|
| 746 |
pr_preview_title,
|
| 747 |
pr_description,
|
| 748 |
pr_submit,
|
|
|
|
| 749 |
],
|
| 750 |
show_api = False,
|
| 751 |
)
|
|
@@ -847,6 +848,11 @@ You can freely edit and test GGUF chat template(s) (and are encouraged to do so)
|
|
| 847 |
|
| 848 |
pr_created = commit.pr_revision if commit.pr_revision in branches else None
|
| 849 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 850 |
return {
|
| 851 |
model_info: info,
|
| 852 |
hf_branch: gr.skip() if pr_branch else gr.Dropdown(
|
|
@@ -869,6 +875,9 @@ You can freely edit and test GGUF chat template(s) (and are encouraged to do so)
|
|
| 869 |
pr_submit: gr.skip() if pr_branch else gr.Button(
|
| 870 |
value = f"Commit to PR #{commit.pr_num}" if pr_created else "Create Pull Request",
|
| 871 |
),
|
|
|
|
|
|
|
|
|
|
| 872 |
}
|
| 873 |
|
| 874 |
|
|
|
|
| 746 |
pr_preview_title,
|
| 747 |
pr_description,
|
| 748 |
pr_submit,
|
| 749 |
+
pr_tabs,
|
| 750 |
],
|
| 751 |
show_api = False,
|
| 752 |
)
|
|
|
|
| 848 |
|
| 849 |
pr_created = commit.pr_revision if commit.pr_revision in branches else None
|
| 850 |
|
| 851 |
+
gr.Info(
|
| 852 |
+
message = "Successfully committed changes.",
|
| 853 |
+
title = f"Pull Request {'Created' if pr_created else 'Updated'}",
|
| 854 |
+
)
|
| 855 |
+
|
| 856 |
return {
|
| 857 |
model_info: info,
|
| 858 |
hf_branch: gr.skip() if pr_branch else gr.Dropdown(
|
|
|
|
| 875 |
pr_submit: gr.skip() if pr_branch else gr.Button(
|
| 876 |
value = f"Commit to PR #{commit.pr_num}" if pr_created else "Create Pull Request",
|
| 877 |
),
|
| 878 |
+
pr_tabs: gr.Tabs(
|
| 879 |
+
selected = "edit",
|
| 880 |
+
),
|
| 881 |
}
|
| 882 |
|
| 883 |
|