Spaces:
Running
Running
|
Download DEPLOY.md from PythonMindset/linguascope: direct link, hf CLI and curl.
- Browser
- Download file 2.04 kB
-
https://huggingface.co/spaces/PythonMindset/linguascope/resolve/main/DEPLOY.md
- Command line
-
hf download hf://spaces/PythonMindset/linguascope/DEPLOY.md
-
curl -L -o DEPLOY.md https://huggingface.co/spaces/PythonMindset/linguascope/resolve/main/DEPLOY.md
2.04 kB
A newer version of the Gradio SDK is available: 6.32.0
Déploiement — LinguaScope
LinguaScope a deux remotes :
| Remote | URL | Contenu |
|---|---|---|
origin |
github.com/chniang/linguascope | code + images (historique complet) |
hf |
huggingface.co/spaces/TIJAANI/linguascope | code texte uniquement (HF refuse les binaires) |
Workflow normal
git push origin main # toujours en premier
bash scripts/push-hf.sh # sync HF ensuite
git push origin main est un push classique, sans restriction.push-hf.sh est nécessaire car HF rejette les commits contenant des binaires (PNG, etc.) — les images du README sont hébergées sur GitHub raw et référencées par URL absolue.
Ce que fait push-hf.sh
- Fetch
hf/mainpour connaître l'état actuel du Space - Diff
hf/main..main, filtre les extensions binaires (*.png,*.jpg,*.gif,*.pdf,*.woff…) - Crée une branche
hf-deploydepuis le tip HF (historique parallèle, sans binaires) - Applique les fichiers texte modifiés/ajoutés/supprimés depuis le dernier sync
- Commit + push
hf-deploy → hf/main, supprime la branche locale
Si HF est déjà à jour (aucun fichier texte modifié), le script sort sans rien faire.
Quand l'utiliser
| Changement | origin |
push-hf.sh |
|---|---|---|
Code Python (app.py, src/) |
✅ | ✅ obligatoire pour que l'app redémarre |
| README / DEPLOY.md | ✅ | ✅ pour mettre à jour la fiche du Space |
Ajout d'images dans screenshots/ |
✅ | ✗ inutile (images sur GitHub raw) |
.gitignore, requirements.txt |
✅ | ✅ |
Ajouter un nouveau type de fichier binaire à exclure
Editer la variable BINARY_EXT dans scripts/push-hf.sh :
BINARY_EXT='\.(png|jpg|jpeg|gif|webp|ico|pdf|zip|tar\.gz|woff2?|ttf|eot)$'
Première utilisation sur un nouveau poste
git clone https://github.com/chniang/linguascope.git
cd linguascope
git remote add hf https://huggingface.co/spaces/TIJAANI/linguascope
git fetch hf
Ensuite le workflow normal s'applique.