Numan sheikh commited on
Commit
d00ea4e
·
1 Parent(s): d506599

Corrected sarcasm model ID in Dockerfile pre-download

Browse files
Files changed (1) hide show
  1. 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
- # --- ADD THESE LINES TO PRE-DOWNLOAD HUGGING FACE MODELS ---
16
- # You need to know the exact model IDs your sentiment and sarcasm scripts use.
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
- # Example for Sarcasm Model (adjust model name if yours is different):
22
- RUN python -c "from transformers import AutoTokenizer, AutoModelForSequenceClassification; tokenizer = AutoTokenizer.from_pretrained('mrm8488/distilroberta-base-finetuned-sarcasm'); model = AutoModelForSequenceClassification.from_pretrained('mrm8488/distilroberta-base-finetuned-sarcasm')"
23
- # --- END OF ADDED LINES ---
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 . .