Spaces:
Runtime error
Runtime error
| # Advanced ML & Performance Dependencies | |
| # Production-ready, lightweight, optimized | |
| # ===== Core ML/NLP ===== | |
| torch>=2.1.0 | |
| transformers>=4.35.0 | |
| sentence-transformers>=2.2.0 # Sentence embeddings (80MB, fast) | |
| tokenizers>=0.15.0 # Rust-based tokenizer (much faster) | |
| datasets>=2.14.0 | |
| # ===== ONNX Optimization (2x faster inference) ===== | |
| onnxruntime>=1.16.0 # CPU-optimized inference | |
| optimum>=1.14.0 # Convert models to ONNX | |
| # ===== Sentiment & NER Models ===== | |
| # Note: Models auto-downloaded on first use | |
| # - cardiffnlp/twitter-roberta-base-sentiment-latest (~500MB) | |
| # - j-hartmann/emotion-english-distilroberta-base (~250MB) | |
| # - dslim/bert-base-NER (~420MB) | |
| # Total: ~1.2GB one-time download, ~300MB in memory | |
| # ===== Scientific Computing ===== | |
| numpy>=1.24.0 | |
| scikit-learn>=1.3.0 # For clustering (DBSCAN) | |
| scipy>=1.11.0 | |
| # ===== Infrastructure ===== | |
| redis>=5.0.0 # Caching and rate limiting | |
| celery>=5.3.0 # Background tasks | |
| kafka-python>=2.0.2 # Event streaming (optional) | |
| # ===== API Framework ===== | |
| fastapi>=0.104.0 | |
| uvicorn[standard]>=0.24.0 | |
| python-multipart>=0.0.6 | |
| sse-starlette>=1.8.0 # Server-Sent Events | |
| websockets>=12.0 # WebSocket support | |
| # ===== Database ===== | |
| sqlalchemy>=2.0.0 | |
| alembic>=1.12.0 | |
| psycopg2-binary>=2.9.0 # PostgreSQL | |
| clickhouse-driver>=0.2.6 # Analytics (optional) | |
| # ===== Monitoring & Logging ===== | |
| prometheus-client>=0.19.0 | |
| python-json-logger>=2.0.0 | |
| # ===== Utilities ===== | |
| python-dotenv>=1.0.0 | |
| pydantic>=2.5.0 | |
| httpx>=0.25.0 # Async HTTP client | |
| aiofiles>=23.2.1 # Async file I/O | |
| # ===== Email ===== | |
| aiosmtplib>=3.0.0 # Async SMTP | |
| # ===== Testing (Dev) ===== | |
| pytest>=7.4.0 | |
| pytest-asyncio>=0.21.0 | |
| pytest-cov>=4.1.0 | |
| httpx>=0.25.0 # For testing FastAPI | |
| faker>=20.0.0 # Generate test data | |
| # ===== Code Quality (Dev) ===== | |
| black>=23.11.0 | |
| isort>=5.12.0 | |
| flake8>=6.1.0 | |
| mypy>=1.7.0 | |
| # ===== Already Installed (from earlier) ===== | |
| # google-generativeai # Gemini API | |
| # These are already in your requirements.txt, keeping them | |