File size: 3,240 Bytes
52d0298 | 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 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 | #!/usr/bin/env python3
"""
Quick dependency checker - shows exactly what's missing
"""
import sys
print("=" * 80)
print("TRANSCRIPTORAI - DEPENDENCY CHECK")
print("=" * 80)
print()
# Critical packages
packages = {
"CRITICAL - LLM": [
("huggingface_hub", "HuggingFace API - WITHOUT THIS, QUALITY SCORE = 0.00"),
],
"CRITICAL - File Processing": [
("docx", "python-docx - DOCX file extraction"),
("pdfplumber", "pdfplumber - PDF file extraction"),
],
"CRITICAL - Web UI": [
("gradio", "Gradio - Web interface"),
],
"Important - Data Processing": [
("pandas", "Pandas - Data manipulation"),
("numpy", "NumPy - Numerical operations"),
],
"Important - Reporting": [
("reportlab", "ReportLab - PDF generation"),
("matplotlib", "Matplotlib - Charts"),
],
"Important - NLP": [
("tiktoken", "TikToken - Token counting"),
("nltk", "NLTK - Text processing"),
("sklearn", "scikit-learn - Text analysis"),
],
"Standard": [
("requests", "Requests - HTTP calls"),
]
}
all_installed = True
missing_critical = []
missing_other = []
for category, pkg_list in packages.items():
print(f"{category}:")
for module, description in pkg_list:
try:
__import__(module)
print(f" β
{description}")
except ImportError:
print(f" β {description}")
all_installed = False
if "CRITICAL" in category:
missing_critical.append(module)
else:
missing_other.append(module)
print()
print("=" * 80)
if all_installed:
print("β
ALL DEPENDENCIES INSTALLED!")
print("=" * 80)
print()
print("You can now run:")
print(" python test_hf_connection.py (test HuggingFace)")
print(" python app.py (launch the app)")
else:
print("β MISSING DEPENDENCIES")
print("=" * 80)
print()
if missing_critical:
print("π¨ CRITICAL packages missing (app won't work):")
for pkg in missing_critical:
if pkg == "huggingface_hub":
print(f" - {pkg} β pip install huggingface_hub")
elif pkg == "docx":
print(f" - python-docx β pip install python-docx")
else:
print(f" - {pkg} β pip install {pkg}")
print()
if missing_other:
print("β οΈ Other packages missing (reduced functionality):")
for pkg in missing_other:
if pkg == "sklearn":
print(f" - scikit-learn β pip install scikit-learn")
else:
print(f" - {pkg} β pip install {pkg}")
print()
print("=" * 80)
print("EASIEST FIX - Install everything at once:")
print("=" * 80)
print()
print("From Windows PowerShell:")
print(" cd \\\\wsl.localhost\\Ubuntu\\home\\john\\TranscriptorEnhanced")
print(" pip install -r requirements.txt")
print()
print("This will install all 13 packages in 2-5 minutes.")
print()
sys.exit(0 if all_installed else 1)
|