|
import subprocess |
|
import sys |
|
|
|
def fix_dependencies(): |
|
""" |
|
Fix dependency issues by installing compatible versions of required packages |
|
""" |
|
print("Fixing dependencies for Resume Screener application...") |
|
|
|
|
|
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" |
|
] |
|
|
|
|
|
for package in packages: |
|
print(f"Installing {package}...") |
|
subprocess.check_call([sys.executable, "-m", "pip", "install", package]) |
|
|
|
|
|
print("Downloading spaCy model...") |
|
subprocess.check_call([sys.executable, "-m", "spacy", "download", "en_core_web_sm"]) |
|
|
|
|
|
print("Downloading NLTK data...") |
|
subprocess.check_call([sys.executable, "-c", "import nltk; nltk.download('punkt')"]) |
|
|
|
print("Dependencies fixed successfully!") |
|
|
|
if __name__ == "__main__": |
|
fix_dependencies() |