Spaces:
Runtime error
Runtime error
Kushal commited on
Commit ·
e814f43
1
Parent(s): 4f772f1
Fix: Add missing dependencies for News Search & Sentiment Analysis
Browse files- Dockerfile +5 -1
- requirements.txt +4 -0
Dockerfile
CHANGED
|
@@ -16,8 +16,12 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|
| 16 |
# This avoids slow cold-start downloads at runtime
|
| 17 |
RUN python -c "\
|
| 18 |
from sentence_transformers import SentenceTransformer, CrossEncoder; \
|
|
|
|
| 19 |
SentenceTransformer('all-MiniLM-L6-v2'); \
|
| 20 |
-
CrossEncoder('cross-encoder/ms-marco-MiniLM-L-6-v2')
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
# Copy application code
|
| 23 |
COPY . .
|
|
|
|
| 16 |
# This avoids slow cold-start downloads at runtime
|
| 17 |
RUN python -c "\
|
| 18 |
from sentence_transformers import SentenceTransformer, CrossEncoder; \
|
| 19 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification; \
|
| 20 |
SentenceTransformer('all-MiniLM-L6-v2'); \
|
| 21 |
+
CrossEncoder('cross-encoder/ms-marco-MiniLM-L-6-v2'); \
|
| 22 |
+
model_name = 'cardiffnlp/twitter-roberta-base-sentiment-latest'; \
|
| 23 |
+
AutoTokenizer.from_pretrained(model_name); \
|
| 24 |
+
AutoModelForSequenceClassification.from_pretrained(model_name)"
|
| 25 |
|
| 26 |
# Copy application code
|
| 27 |
COPY . .
|
requirements.txt
CHANGED
|
@@ -19,3 +19,7 @@ PyPDF2==3.0.1
|
|
| 19 |
python-docx==1.1.0
|
| 20 |
langgraph==0.0.34
|
| 21 |
langchain-core>=0.1.38,<0.2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
python-docx==1.1.0
|
| 20 |
langgraph==0.0.34
|
| 21 |
langchain-core>=0.1.38,<0.2.0
|
| 22 |
+
requests==2.31.0
|
| 23 |
+
beautifulsoup4==4.12.2
|
| 24 |
+
dateparser==1.2.0
|
| 25 |
+
scipy==1.11.3
|