File size: 1,260 Bytes
e84a893 1205261 e84a893 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
import subprocess
import sys
def fix_dependencies():
"""
Fix dependency issues by installing compatible versions of required packages
"""
print("Fixing dependencies for Resume Screener application...")
# List of compatible package versions
packages = [
"streamlit==1.22.0",
"pdfplumber==0.9.0",
"spacy==3.5.0",
"transformers==4.28.1",
"torch>=1.13.1",
"huggingface-hub==0.14.1",
"sentence-transformers==2.2.2",
"nltk==3.8.1",
"plotly==5.14.1",
"pandas==1.5.3",
"numpy==1.24.3",
"matplotlib==3.7.1",
"pydantic<2.0.0"
]
# Install each package
for package in packages:
print(f"Installing {package}...")
subprocess.check_call([sys.executable, "-m", "pip", "install", package])
# Download spaCy model
print("Downloading spaCy model...")
subprocess.check_call([sys.executable, "-m", "spacy", "download", "en_core_web_sm"])
# Download NLTK data
print("Downloading NLTK data...")
subprocess.check_call([sys.executable, "-c", "import nltk; nltk.download('punkt')"])
print("Dependencies fixed successfully!")
if __name__ == "__main__":
fix_dependencies() |