bebechien commited on
Commit
d6c6a2d
·
verified ·
1 Parent(s): ad4164f

Upload folder using huggingface_hub

Browse files
Files changed (3) hide show
  1. README.md +2 -2
  2. src/model_trainer.py +1 -1
  3. src/ui.py +4 -4
README.md CHANGED
@@ -1,5 +1,5 @@
1
  ---
2
- title: EmbeddingGemma Modkit
3
  emoji: 😻
4
  colorFrom: green
5
  colorTo: indigo
@@ -13,7 +13,7 @@ hf_oauth_scopes:
13
  license: apache-2.0
14
  ---
15
 
16
- # 🤖 EmbeddingGemma Modkit: Fine-Tuning and Mood Reader
17
 
18
  This project provides a set of tools to fine-tune EmbeddingGemma to understand your personal taste in Hacker News titles and then use it to score and rank new articles based on their "vibe."
19
 
 
1
  ---
2
+ title: EmbeddingGemma Tuning Lab
3
  emoji: 😻
4
  colorFrom: green
5
  colorTo: indigo
 
13
  license: apache-2.0
14
  ---
15
 
16
+ # 🤖 EmbeddingGemma Tuning Lab: Fine-Tuning and Mood Reader
17
 
18
  This project provides a set of tools to fine-tune EmbeddingGemma to understand your personal taste in Hacker News titles and then use it to score and rank new articles based on their "vibe."
19
 
src/model_trainer.py CHANGED
@@ -88,7 +88,7 @@ def upload_model_to_hub(folder_path: Path, repo_name: str, token: str) -> str:
88
  token=token
89
  )
90
  tags = info.card_data.tags
91
- tags.append("embeddinggemma-modkit")
92
  metadata_update(repo_id, {"tags": tags}, overwrite=True, token=token)
93
 
94
  return f"✅ Success! Model published at: {url}"
 
88
  token=token
89
  )
90
  tags = info.card_data.tags
91
+ tags.append("embeddinggemma-tuninglab")
92
  metadata_update(repo_id, {"tags": tags}, overwrite=True, token=token)
93
 
94
  return f"✅ Success! Model published at: {url}"
src/ui.py CHANGED
@@ -99,7 +99,7 @@ def mood_feed_wrapper(app):
99
  # --- Interface Setup ---
100
 
101
  def build_interface() -> gr.Blocks:
102
- with gr.Blocks(title="EmbeddingGemma Modkit") as demo:
103
  session_state = gr.State()
104
  username_state = gr.State()
105
 
@@ -109,8 +109,8 @@ def build_interface() -> gr.Blocks:
109
  reset_counter = gr.State(0)
110
 
111
  with gr.Column():
112
- gr.Markdown("# 🤖 EmbeddingGemma Modkit: Fine-Tuning and Mood Reader")
113
- gr.Markdown("This project provides a set of tools to fine-tune [EmbeddingGemma](https://huggingface.co/google/embeddinggemma-300m) to understand your personal taste in Hacker News titles and then use it to score and rank new articles based on their \"vibe\". The core idea is to measure the \"vibe\" of a news title by calculating the semantic similarity between its embedding and the embedding of a fixed anchor phrase, **`MY_FAVORITE_NEWS`**.<br>See [README](https://huggingface.co/spaces/google/embeddinggemma-modkit/blob/main/README.md) for more details.")
114
 
115
  with gr.Tab("⚙️ Train & Export"):
116
 
@@ -182,7 +182,7 @@ def build_interface() -> gr.Blocks:
182
  # Option B: Upload
183
  with gr.Accordion("Option B: Upload Custom Dataset", open=False):
184
  gr.Markdown("Upload a CSV file with columns (no header required, or header ignored if present): `Anchor`, `Positive`, `Negative`.")
185
- gr.Markdown("See also: [example_training.dataset.csv](https://huggingface.co/spaces/google/embeddinggemma-modkit/blob/main/example_training_dataset.csv)<br>Example:<br>`MY_FAVORITE_NEWS,Good Title,Bad Title`")
186
  import_file = gr.File(label="Upload Additional Dataset (.csv)", file_types=[".csv"], height=100)
187
 
188
  # --- Step 2: Training ---
 
99
  # --- Interface Setup ---
100
 
101
  def build_interface() -> gr.Blocks:
102
+ with gr.Blocks(title="EmbeddingGemma Tuning Lab") as demo:
103
  session_state = gr.State()
104
  username_state = gr.State()
105
 
 
109
  reset_counter = gr.State(0)
110
 
111
  with gr.Column():
112
+ gr.Markdown("# 🤖 EmbeddingGemma Tuning Lab: Fine-Tuning and Mood Reader")
113
+ gr.Markdown("This project provides a set of tools to fine-tune [EmbeddingGemma](https://huggingface.co/google/embeddinggemma-300m) to understand your personal taste in Hacker News titles and then use it to score and rank new articles based on their \"vibe\". The core idea is to measure the \"vibe\" of a news title by calculating the semantic similarity between its embedding and the embedding of a fixed anchor phrase, **`MY_FAVORITE_NEWS`**.<br>See [README](https://huggingface.co/spaces/google/embeddinggemma-tuninglab/blob/main/README.md) for more details.")
114
 
115
  with gr.Tab("⚙️ Train & Export"):
116
 
 
182
  # Option B: Upload
183
  with gr.Accordion("Option B: Upload Custom Dataset", open=False):
184
  gr.Markdown("Upload a CSV file with columns (no header required, or header ignored if present): `Anchor`, `Positive`, `Negative`.")
185
+ gr.Markdown("See also: [example_training.dataset.csv](https://huggingface.co/spaces/google/embeddinggemma-tuninglab/blob/main/example_training_dataset.csv)<br>Example:<br>`MY_FAVORITE_NEWS,Good Title,Bad Title`")
186
  import_file = gr.File(label="Upload Additional Dataset (.csv)", file_types=[".csv"], height=100)
187
 
188
  # --- Step 2: Training ---