Spaces:
Runtime error
Runtime error
Numan sheikh
commited on
Commit
·
d00ea4e
1
Parent(s):
d506599
Corrected sarcasm model ID in Dockerfile pre-download
Browse files- Dockerfile +5 -7
Dockerfile
CHANGED
@@ -12,15 +12,13 @@ COPY requirements.txt .
|
|
12 |
RUN pip install --no-cache-dir -r requirements.txt \
|
13 |
&& python -m textblob.download_corpora
|
14 |
|
15 |
-
# ---
|
16 |
-
#
|
17 |
-
# I'll use common examples. Adjust if your models are different.
|
18 |
-
# Example for Sentiment Model (adjust model name if yours is different):
|
19 |
RUN python -c "from transformers import pipeline; pipeline('sentiment-analysis', model='cardiffnlp/twitter-roberta-base-sentiment-latest')"
|
20 |
|
21 |
-
#
|
22 |
-
RUN python -c "from transformers import AutoTokenizer, AutoModelForSequenceClassification; tokenizer = AutoTokenizer.from_pretrained('
|
23 |
-
# --- END OF
|
24 |
|
25 |
# Copy the entire project directory into the container at /app
|
26 |
COPY . .
|
|
|
12 |
RUN pip install --no-cache-dir -r requirements.txt \
|
13 |
&& python -m textblob.download_corpora
|
14 |
|
15 |
+
# --- UPDATED HUGGING FACE MODELS PRE-DOWNLOAD ---
|
16 |
+
# Sentiment Model (already correct)
|
|
|
|
|
17 |
RUN python -c "from transformers import pipeline; pipeline('sentiment-analysis', model='cardiffnlp/twitter-roberta-base-sentiment-latest')"
|
18 |
|
19 |
+
# Sarcasm/Irony Model (CORRECTED)
|
20 |
+
RUN python -c "from transformers import AutoTokenizer, AutoModelForSequenceClassification; tokenizer = AutoTokenizer.from_pretrained('cardiffnlp/twitter-roberta-base-irony'); model = AutoModelForSequenceClassification.from_pretrained('cardiffnlp/twitter-roberta-base-irony')"
|
21 |
+
# --- END OF UPDATED LINES ---
|
22 |
|
23 |
# Copy the entire project directory into the container at /app
|
24 |
COPY . .
|