Skip to content

Commit

Permalink
מיון קבצים
Browse files Browse the repository at this point in the history
  • Loading branch information
NHLOCAL committed Dec 19, 2024
1 parent ba65c73 commit ebeb13f
Show file tree
Hide file tree
Showing 8 changed files with 36,167 additions and 3,735 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/run_gemini_v2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Run Gemini API Processing

on:
push:
branches:
- machine-learn
paths:
- 'machine-learn/scrape_data/level0/Gemini-synthetic-v2/**'
- '.github/workflows/run_gemini_v2.yml'

jobs:
process_songs:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install google-generativeai
- name: Run Python Script for lines 10001-10500
env:
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
run: |
python machine-learn/scrape_data/level0/Gemini-synthetic-v2/gemini_api_creating.py 10001 10500
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: song-variations-output
path: song_variations_output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


# קביעת מספר השורות שהקוד מעבד
MAX_LINES = 200
MAX_LINES = 1000
CHUNK_SIZE = 50

# הגדרת הקונפיגורציה ליצירת המודל
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ def convert_json_for_ner(input_file, output_file):

if __name__ == '__main__':
input_file = 'tagged_songs.json' # שנה לנתיב קובץ הקלט שלך
output_file = 'tagged_songs_ner.json' # שנה לנתיב קובץ הפלט שלך
output_file = 'new-data.json' # שנה לנתיב קובץ הפלט שלך
convert_json_for_ner(input_file, output_file)
print(f"הקובץ {input_file} הומר בהצלחה לקובץ {output_file}")
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def inspect_samples(tagged_data, sample_size=10):
logging.info(f"הוצגו {sample_size} דוגמאות אקראיות לבדיקה ידנית.")

def main():
output_file = 'tagged_songs_ner.json'
output_file = 'new-data.json'

# טען את הנתונים התויגים
tagged_data = load_tagged_data(output_file)
Expand Down
Loading

0 comments on commit ebeb13f

Please sign in to comment.