modified: app.py
This commit is contained in:
parent
c63cfe0de6
commit
36e2c681f9
2 changed files with 6 additions and 2 deletions
|
|
@ -31,9 +31,12 @@ COPY . .
|
|||
|
||||
RUN pip install --no-cache-dir -r requirements.lock
|
||||
|
||||
# Set NLTK data directory environment variable explicitly
|
||||
ENV NLTK_DATA=/usr/local/share/nltk_data
|
||||
|
||||
RUN playwright install --with-deps && \
|
||||
python -c "from unstructured.nlp.tokenize import download_nltk_packages; download_nltk_packages()" && \
|
||||
python -c "import nltk;nltk.download('punkt_tab'); nltk.download('averaged_perceptron_tagger_eng')" && \
|
||||
mkdir -p $NLTK_DATA && \
|
||||
python -c "import nltk; nltk.download('punkt', download_dir='$NLTK_DATA'); nltk.download('averaged_perceptron_tagger', download_dir='$NLTK_DATA')" && \
|
||||
python -c "from unstructured.partition.model_init import initialize; initialize()"
|
||||
|
||||
EXPOSE 8001
|
||||
|
|
|
|||
1
app.py
1
app.py
|
|
@ -151,6 +151,7 @@ class FileExtension(str, Enum):
|
|||
PPTX = ".pptx"
|
||||
PPT = ".ppt"
|
||||
JSON = ".json"
|
||||
LOG = ".log"
|
||||
MD = ".md"
|
||||
MARKDOWN = ".markdown"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue