Feature Extraction
sentence-transformers
PyTorch
English
custom_snp
emotional-ai
reasoning-embedding
substrate-prism
cognitive-modeling
Instructions to use 366degrees/snp-universal-embedding with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use 366degrees/snp-universal-embedding with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("366degrees/snp-universal-embedding") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Notebooks
- Google Colab
- Kaggle
| # Use lightweight Python base | |
| FROM python:3.10-slim | |
| # Set working directory | |
| WORKDIR /app | |
| # Copy files | |
| COPY . . | |
| # Install dependencies | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Create cache directory and make it writable for non-root | |
| RUN mkdir -p /app/hf_cache && chmod -R 777 /app/hf_cache | |
| # Set environment variables for Hugging Face cache | |
| ENV HF_HOME=/app/hf_cache | |
| ENV TRANSFORMERS_CACHE=/app/hf_cache | |
| # Expose Space port | |
| EXPOSE 7860 | |
| # Switch to non-root user | |
| RUN useradd -m appuser | |
| USER appuser | |
| # Run Flask directly (no Gunicorn) | |
| CMD ["python", "api_inference.py"] | |