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
PunchNFIT commited on
Commit ·
b9e5b93
1
Parent(s): 19e466d
Force explicit file copy for Hugging Face build context
Browse files- Dockerfile +16 -5
Dockerfile
CHANGED
|
@@ -1,14 +1,25 @@
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
| 3 |
-
#
|
| 4 |
-
|
| 5 |
WORKDIR /app
|
| 6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
# Install dependencies
|
| 8 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
| 9 |
|
| 10 |
# Expose Hugging Face port
|
| 11 |
EXPOSE 7860
|
| 12 |
|
| 13 |
-
#
|
| 14 |
-
CMD ["python", "api_inference.py"]
|
|
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
| 3 |
+
# Make absolutely sure the working directory exists
|
| 4 |
+
RUN mkdir -p /app
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# Print working directory (for debugging)
|
| 8 |
+
RUN echo "✅ Building from context:" && pwd && ls -R
|
| 9 |
+
|
| 10 |
+
# Copy specific files explicitly by name
|
| 11 |
+
COPY api_inference.py /app/api_inference.py
|
| 12 |
+
COPY snp_universal_embedding.py /app/snp_universal_embedding.py
|
| 13 |
+
COPY config.json /app/config.json
|
| 14 |
+
COPY tokenizer.json /app/tokenizer.json
|
| 15 |
+
COPY pytorch_model.bin /app/pytorch_model.bin
|
| 16 |
+
COPY requirements.txt /app/requirements.txt
|
| 17 |
+
|
| 18 |
# Install dependencies
|
| 19 |
+
RUN pip install --no-cache-dir -r /app/requirements.txt
|
| 20 |
|
| 21 |
# Expose Hugging Face port
|
| 22 |
EXPOSE 7860
|
| 23 |
|
| 24 |
+
# Run the app
|
| 25 |
+
CMD ["python", "/app/api_inference.py"]
|