|
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.4.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==1.10.8", |
|
"protobuf<4.0.0", |
|
"tqdm>=4.27", |
|
"regex>=2022.1.18", |
|
"scikit-learn==1.0.2", |
|
"scipy==1.8.1" |
|
] |
|
|
|
|
|
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() |