Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files- pre_deploy_check.py +6 -2
- requirements.txt +3 -2
pre_deploy_check.py
CHANGED
|
@@ -107,14 +107,18 @@ def check_requirements_txt():
|
|
| 107 |
if '��' in content or '→' in content:
|
| 108 |
issues.append("File has encoding issues (contains weird characters)")
|
| 109 |
|
| 110 |
-
# Check for missing versions
|
| 111 |
lines = content.split('\n')
|
| 112 |
missing_versions = []
|
|
|
|
|
|
|
| 113 |
for line in lines:
|
| 114 |
line = line.strip()
|
| 115 |
if line and not line.startswith('#'):
|
| 116 |
if '==' not in line and '>=' not in line and not line.startswith('git+'):
|
| 117 |
-
|
|
|
|
|
|
|
| 118 |
|
| 119 |
if missing_versions:
|
| 120 |
issues.append(f"Packages without version: {', '.join(missing_versions[:5])}")
|
|
|
|
| 107 |
if '��' in content or '→' in content:
|
| 108 |
issues.append("File has encoding issues (contains weird characters)")
|
| 109 |
|
| 110 |
+
# Check for missing versions (but allow some packages without versions like ftfy, regex)
|
| 111 |
lines = content.split('\n')
|
| 112 |
missing_versions = []
|
| 113 |
+
allowed_without_version = ['ftfy', 'regex', 'wheel', 'setuptools', 'pip'] # Dependencies that don't need strict versions
|
| 114 |
+
|
| 115 |
for line in lines:
|
| 116 |
line = line.strip()
|
| 117 |
if line and not line.startswith('#'):
|
| 118 |
if '==' not in line and '>=' not in line and not line.startswith('git+'):
|
| 119 |
+
# Check if it's in the allowed list
|
| 120 |
+
if not any(allowed in line.lower() for allowed in allowed_without_version):
|
| 121 |
+
missing_versions.append(line)
|
| 122 |
|
| 123 |
if missing_versions:
|
| 124 |
issues.append(f"Packages without version: {', '.join(missing_versions[:5])}")
|
requirements.txt
CHANGED
|
@@ -18,7 +18,6 @@ gradio>=4.0.0
|
|
| 18 |
# Motion processing & visualization
|
| 19 |
matplotlib>=3.5.3
|
| 20 |
trimesh>=4.9.0
|
| 21 |
-
chumpy>=0.70
|
| 22 |
Pillow>=9.2.0
|
| 23 |
|
| 24 |
# Video processing
|
|
@@ -35,7 +34,9 @@ vector-quantize-pytorch>=1.6.0
|
|
| 35 |
# Hugging Face Hub
|
| 36 |
huggingface-hub>=1.0.0
|
| 37 |
|
| 38 |
-
# OpenAI CLIP
|
|
|
|
|
|
|
| 39 |
git+https://github.com/openai/CLIP.git
|
| 40 |
|
| 41 |
# Additional utilities
|
|
|
|
| 18 |
# Motion processing & visualization
|
| 19 |
matplotlib>=3.5.3
|
| 20 |
trimesh>=4.9.0
|
|
|
|
| 21 |
Pillow>=9.2.0
|
| 22 |
|
| 23 |
# Video processing
|
|
|
|
| 34 |
# Hugging Face Hub
|
| 35 |
huggingface-hub>=1.0.0
|
| 36 |
|
| 37 |
+
# OpenAI CLIP (install last to avoid conflicts)
|
| 38 |
+
ftfy
|
| 39 |
+
regex
|
| 40 |
git+https://github.com/openai/CLIP.git
|
| 41 |
|
| 42 |
# Additional utilities
|