Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files
README.md
CHANGED
|
@@ -34,8 +34,8 @@ Whether you are building an agent to query internal knowledge bases, control sma
|
|
| 34 |
|
| 35 |
1. **Clone the repository:**
|
| 36 |
```bash
|
| 37 |
-
hf download google/functiongemma-
|
| 38 |
-
cd functiongemma-
|
| 39 |
```
|
| 40 |
|
| 41 |
2. **Install dependencies:**
|
|
|
|
| 34 |
|
| 35 |
1. **Clone the repository:**
|
| 36 |
```bash
|
| 37 |
+
hf download google/functiongemma-tuning-lab --repo-type=space --local-dir=functiongemma-tuning-lab
|
| 38 |
+
cd functiongemma-tuning-lab
|
| 39 |
```
|
| 40 |
|
| 41 |
2. **Install dependencies:**
|
config.py
CHANGED
|
@@ -10,7 +10,7 @@ class AppConfig:
|
|
| 10 |
"""
|
| 11 |
# Directory Setup
|
| 12 |
ARTIFACTS_DIR: Final[Path] = Path("artifacts")
|
| 13 |
-
OUTPUT_DIR: Final[Path] = ARTIFACTS_DIR.joinpath("functiongemma-
|
| 14 |
|
| 15 |
# Model & Data
|
| 16 |
HF_TOKEN: Final[Optional[str]] = os.getenv('HF_TOKEN')
|
|
|
|
| 10 |
"""
|
| 11 |
# Directory Setup
|
| 12 |
ARTIFACTS_DIR: Final[Path] = Path("artifacts")
|
| 13 |
+
OUTPUT_DIR: Final[Path] = ARTIFACTS_DIR.joinpath("functiongemma-tuning-lab-demo")
|
| 14 |
|
| 15 |
# Model & Data
|
| 16 |
HF_TOKEN: Final[Optional[str]] = os.getenv('HF_TOKEN')
|
engine.py
CHANGED
|
@@ -403,7 +403,7 @@ class FunctionGemmaEngine:
|
|
| 403 |
token=oauth_token
|
| 404 |
)
|
| 405 |
tags = info.card_data.tags
|
| 406 |
-
tags.append("functiongemma-
|
| 407 |
metadata_update(repo_id, {"tags": tags}, overwrite=True, token=oauth_token)
|
| 408 |
|
| 409 |
return f"✅ Success! Model uploaded to: {repo_url}"
|
|
|
|
| 403 |
token=oauth_token
|
| 404 |
)
|
| 405 |
tags = info.card_data.tags
|
| 406 |
+
tags.append("functiongemma-tuning-lab")
|
| 407 |
metadata_update(repo_id, {"tags": tags}, overwrite=True, token=oauth_token)
|
| 408 |
|
| 409 |
return f"✅ Success! Model uploaded to: {repo_url}"
|
ui.py
CHANGED
|
@@ -102,7 +102,7 @@ def _render_header():
|
|
| 102 |
with gr.Column():
|
| 103 |
gr.Markdown("# 🤖 FunctionGemma Tuning Lab: Fine-Tuning")
|
| 104 |
gr.Markdown("Fine-tune FunctionGemma to understand your custom functions.<br>"
|
| 105 |
-
"See [README](https://huggingface.co/spaces/google/functiongemma-
|
| 106 |
gr.Markdown("(Optional) Sign in to Hugging Face if you plan to push your fine-tuned model to the Hub later (3. Export).")
|
| 107 |
with gr.Row():
|
| 108 |
gr.LoginButton(value="Sign in with Hugging Face")
|
|
@@ -180,7 +180,7 @@ def _render_export_tab(engine_state, username_state):
|
|
| 180 |
gr.Markdown("#### Option B: Save to Hugging Face Hub")
|
| 181 |
gr.Markdown("Publish your fine-tuned model to your personal Hugging Face account.")
|
| 182 |
repo_name_input = gr.Textbox(
|
| 183 |
-
label="Target Repository Name", value="functiongemma-270m-it-
|
| 184 |
)
|
| 185 |
push_to_hub_btn = gr.Button("Save to Hugging Face Hub", variant="secondary", interactive=False)
|
| 186 |
repo_id_preview = gr.Markdown("Target Repository: (Waiting for input...)")
|
|
|
|
| 102 |
with gr.Column():
|
| 103 |
gr.Markdown("# 🤖 FunctionGemma Tuning Lab: Fine-Tuning")
|
| 104 |
gr.Markdown("Fine-tune FunctionGemma to understand your custom functions.<br>"
|
| 105 |
+
"See [README](https://huggingface.co/spaces/google/functiongemma-tuning-lab/blob/main/README.md) for more details.")
|
| 106 |
gr.Markdown("(Optional) Sign in to Hugging Face if you plan to push your fine-tuned model to the Hub later (3. Export).")
|
| 107 |
with gr.Row():
|
| 108 |
gr.LoginButton(value="Sign in with Hugging Face")
|
|
|
|
| 180 |
gr.Markdown("#### Option B: Save to Hugging Face Hub")
|
| 181 |
gr.Markdown("Publish your fine-tuned model to your personal Hugging Face account.")
|
| 182 |
repo_name_input = gr.Textbox(
|
| 183 |
+
label="Target Repository Name", value="functiongemma-270m-it-tuning-lab", placeholder="e.g., functiongemma-270m-it-tuned", interactive=False
|
| 184 |
)
|
| 185 |
push_to_hub_btn = gr.Button("Save to Hugging Face Hub", variant="secondary", interactive=False)
|
| 186 |
repo_id_preview = gr.Markdown("Target Repository: (Waiting for input...)")
|