Skip to content

Commit 037d69c

Browse files
committed
elimino trackeo de model para solucionar conflicto con deploy en HF
1 parent d17db35 commit 037d69c

7 files changed

Lines changed: 24 additions & 10 deletions

File tree

.github/workflows/sync.yml

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,35 @@ name: Sync to Hugging Face hub
22
on:
33
push:
44
branches: [main, master]
5-
# Permite correrlo manualmente desde la pestaña Actions
65
workflow_dispatch:
76

87
jobs:
98
sync-to-hub:
109
runs-on: ubuntu-latest
1110
steps:
12-
- uses: actions/checkout@v3
11+
- name: Checkout GitHub Repo
12+
uses: actions/checkout@v3
1313
with:
14+
path: main-repo
1415
fetch-depth: 0
15-
lfs: true
16-
- name: Push to hub
17-
env:
18-
HF_TOKEN: ${{ secrets.HF_TOKEN }}
16+
17+
- name: Checkout Hugging Face Repo
18+
run: |
19+
# Clonamos el repositorio de Hugging Face
20+
git clone https://mmorullo:${{ secrets.HF_TOKEN }}@huggingface.co/spaces/mmorullo/CodeAI-Detector hf-repo
21+
22+
- name: Sync and Push
1923
run: |
24+
# Configurar identidad de Git
2025
git config --global user.email "[email protected]"
2126
git config --global user.name "github-actions"
22-
rm -rf model/
27+
28+
# Sincronizamos solo el código, ignorando la carpeta 'model' y '.git'
29+
# Esto hace que el 'model/' que ya está en Hugging Face se mantenga intacto.
30+
rsync -av --progress --exclude '.git' --exclude 'model' main-repo/ hf-repo/
31+
32+
# Entramos al repositorio de HF, guardamos cambios y subimos
33+
cd hf-repo
2334
git add .
24-
git commit -m "Excluyendo binarios para Hugging Face" || echo "No hay cambios para commitear"
25-
git push --force https://mmorullo:[email protected]/spaces/mmorullo/CodeAI-Detector main
35+
git commit -m "Actualización de código desde GitHub (Sincronización segura)" || echo "No hay cambios para subir"
36+
git push origin main

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,7 @@ __pycache__/
99

1010
# Carpeta del entorno virtual
1111
env/
12-
.venv/
12+
.venv/
13+
14+
# Carpeta del modelo
15+
model/

model/index_to_label.pickle

-64 Bytes
Binary file not shown.

model/label_to_index.pickle

-64 Bytes
Binary file not shown.

model/language_model.h5

-454 KB
Binary file not shown.

model/max_length.pickle

-15 Bytes
Binary file not shown.

model/tokenizer.pickle

-183 KB
Binary file not shown.

0 commit comments

Comments
 (0)