bebechien commited on
Commit
4947547
·
verified ·
1 Parent(s): c3fd3ab

move warning message and fix hf tag

Browse files
Files changed (2) hide show
  1. engine.py +5 -2
  2. ui.py +2 -2
engine.py CHANGED
@@ -438,8 +438,11 @@ class FunctionGemmaEngine:
438
  repo_id=repo_id,
439
  token=oauth_token
440
  )
441
- tags = info.card_data.tags
442
- tags.append("functiongemma-tuning-lab")
 
 
 
443
  metadata_update(repo_id, {"tags": tags}, overwrite=True, token=oauth_token)
444
 
445
  return f"✅ Success! Model uploaded to: {repo_url}"
 
438
  repo_id=repo_id,
439
  token=oauth_token
440
  )
441
+ tags = ["functiongemma", "functiongemma-tuning-lab"]
442
+ if (info.card_data) {
443
+ tags = info.card_data.tags
444
+ tags.append("functiongemma-tuning-lab")
445
+ }
446
  metadata_update(repo_id, {"tags": tags}, overwrite=True, token=oauth_token)
447
 
448
  return f"✅ Success! Model uploaded to: {repo_url}"
ui.py CHANGED
@@ -112,11 +112,11 @@ def _render_header():
112
  gr.Markdown("# 🤖 FunctionGemma Tuning Lab: Fine-Tuning")
113
  gr.Markdown("Fine-tune FunctionGemma to understand your custom functions.<br>"
114
  "See [README](https://huggingface.co/spaces/google/functiongemma-tuning-lab/blob/main/README.md) for more details.")
115
- gr.Markdown("(Optional) Sign in to Hugging Face if you plan to push your fine-tuned model to the Hub later (3. Export).")
116
  with gr.Row():
117
  gr.LoginButton(value="Sign in with Hugging Face")
118
  with gr.Column(scale=3):
119
- gr.Markdown("⚠️ **Warning:** Signing in will refresh the page and reset your current session (including data and model progress).")
120
 
121
  def _render_dataset_tab(engine_state):
122
  with gr.TabItem("1. Preparing Dataset"):
 
112
  gr.Markdown("# 🤖 FunctionGemma Tuning Lab: Fine-Tuning")
113
  gr.Markdown("Fine-tune FunctionGemma to understand your custom functions.<br>"
114
  "See [README](https://huggingface.co/spaces/google/functiongemma-tuning-lab/blob/main/README.md) for more details.")
115
+ gr.Markdown("(Optional) Sign in to Hugging Face if you plan to push your fine-tuned model to the Hub later (3. Export).<br>⚠️ **Warning:** Signing in will refresh the page and reset your current session (including data and model progress).")
116
  with gr.Row():
117
  gr.LoginButton(value="Sign in with Hugging Face")
118
  with gr.Column(scale=3):
119
+ gr.Markdown("")
120
 
121
  def _render_dataset_tab(engine_state):
122
  with gr.TabItem("1. Preparing Dataset"):