manue commited on
Commit
7163daa
·
1 Parent(s): 2ad0e0b

Update Dockerfile and sentiment model initialization for improved caching and remove obsolete model reference

Browse files
Dockerfile CHANGED
@@ -4,6 +4,8 @@ WORKDIR /app
4
 
5
  COPY . /app
6
 
 
 
7
  RUN pip install --no-cache-dir -r requirements.txt
8
 
9
  CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app"]
 
4
 
5
  COPY . /app
6
 
7
+ ENV HUGGINGFACE_DISABLE_CACHE=1
8
+
9
  RUN pip install --no-cache-dir -r requirements.txt
10
 
11
  CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app"]
model/sentiment.py CHANGED
@@ -3,6 +3,6 @@ from typing import Any
3
 
4
  class Sentiment:
5
  def __init__(self, line: str) -> (list | list[Any] | Any | None):
6
- self.pipe = pipeline("text-classification", model="MilaNLProc/feel-it-italian-sentiment")
7
  self.result = self.pipe(line)
8
 
 
3
 
4
  class Sentiment:
5
  def __init__(self, line: str) -> (list | list[Any] | Any | None):
6
+ self.pipe = pipeline("text-classification", model="MilaNLProc/feel-it-italian-sentiment", use_cache=False)
7
  self.result = self.pipe(line)
8
 
models/feel-it-italian-sentiment DELETED
@@ -1 +0,0 @@
1
- Subproject commit 98744f71b7b3a47ba00d57b2736c3af794c417ff