dani-ange commited on
Commit
02efdba
·
unverified ·
1 Parent(s): db1f31c

Update train-deploy.yaml

Browse files
Files changed (1) hide show
  1. .github/workflows/train-deploy.yaml +15 -6
.github/workflows/train-deploy.yaml CHANGED
@@ -21,21 +21,30 @@ jobs:
21
 
22
  - name: Install dependencies
23
  run: pip install -r requirements.txt
 
24
  - name: Upgrade Hugging Face Hub
25
  run: pip install --upgrade huggingface_hub
26
 
27
- - name: Authenticate with Hugging Face
28
  run: |
29
- huggingface-cli login --token "${{ secrets.HUGGINGFACE_API_TOKEN }}" --add-to-git-credential
30
-
 
 
 
 
 
 
31
  - name: Deploy to Hugging Face
32
  env:
33
- HF_TOKEN: ${{ secrets.HUGGINGFACE_API_TOKEN }}
34
  run: |
35
- huggingface-cli login --token $HF_TOKEN
36
  git config --global user.email "[email protected]"
37
  git config --global user.name "dani-ange"
 
 
 
 
38
  git add .
39
  git commit -m "Updated model"
40
- git lfs migrate import --everything --include "*.joblib"
41
  git push https://danielle2003:[email protected]/spaces/danielle2003/diabeties-ml main
 
21
 
22
  - name: Install dependencies
23
  run: pip install -r requirements.txt
24
+
25
  - name: Upgrade Hugging Face Hub
26
  run: pip install --upgrade huggingface_hub
27
 
28
+ - name: Install Git LFS
29
  run: |
30
+ sudo apt-get install git-lfs
31
+ git lfs install
32
+
33
+ - name: Authenticate with Hugging Face
34
+ env:
35
+ HF_TOKEN: ${{ secrets.HUGGINGFACE_API_TOKEN }}
36
+ run: huggingface-cli login --token $HF_TOKEN --add-to-git-credential
37
+
38
  - name: Deploy to Hugging Face
39
  env:
40
+ HF_TOKEN: ${{ secrets.HUGGINGFACE_API_TOKEN }}
41
  run: |
 
42
  git config --global user.email "[email protected]"
43
  git config --global user.name "dani-ange"
44
+
45
+ # Ensure Git LFS tracks the right files
46
+ git lfs track "*.joblib"
47
+
48
  git add .
49
  git commit -m "Updated model"
 
50
  git push https://danielle2003:[email protected]/spaces/danielle2003/diabeties-ml main