Spaces:
Runtime error
Runtime error
fastapi
Browse filesFiles changed (2)
- Dockerfile+2-1
- app/nltk.py+1-2
5 unmodified lines67891011125 unmodified linesRUN pip install --upgrade pipRUN pip install -r /code/app/requirements.txtEXPOSE 7860CMD python app/nltk.py && uvicorn app.main:app --host 0.0.0.0 --port 78605 unmodified lines6789101112135 unmodified linesRUN pip install --upgrade pipRUN pip install -r /code/app/requirements.txtRUN python /code/app/nltk.pyEXPOSE 7860CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
12345678# app/prepare_nltk.pyimport osimport nltkNLTK_DATA_DIR = "/home/user/app/nltk_data"os.makedirs(NLTK_DATA_DIR, exist_ok=True)nltk.data.path.append(NLTK_DATA_DIR)1234567import osimport nltkNLTK_DATA_DIR = "/code/nltk_data" # aman dan bisa ditulisos.makedirs(NLTK_DATA_DIR, exist_ok=True)nltk.data.path.append(NLTK_DATA_DIR)
Dockerfile+2-1
app/nltk.py+1-2