Spaces:
Build error
Build error
Commit
·
c474a36
1
Parent(s):
af7f187
- Dockerfile +1 -2
- app/load_vectors.py +1 -1
Dockerfile
CHANGED
|
@@ -6,7 +6,6 @@ RUN apt-get install -y git
|
|
| 6 |
RUN apt install -y make wget git gcc g++ lhasa libgmp-dev libmpfr-dev libmpc-dev flex bison gettext texinfo ncurses-dev autoconf rsync
|
| 7 |
COPY ./app .
|
| 8 |
RUN pip install -r requirements.txt
|
| 9 |
-
RUN ls -la
|
| 10 |
#RUN python load_docs.py
|
| 11 |
RUN --mount=type=secret,id=OPENAI_API_KEY \
|
| 12 |
cat /run/secrets/OPENAI_API_KEY > .openaiapikey
|
|
@@ -17,7 +16,7 @@ RUN mkdir /nltk_data
|
|
| 17 |
RUN chmod 777 /nltk_data
|
| 18 |
RUN mkdir /VectorStore
|
| 19 |
RUN chmod 777 /VectorStore
|
| 20 |
-
|
| 21 |
CMD ["streamlit", "run", "app.py", "--server.port=7860"]
|
| 22 |
#CMD ls -la
|
| 23 |
EXPOSE 7860
|
|
|
|
| 6 |
RUN apt install -y make wget git gcc g++ lhasa libgmp-dev libmpfr-dev libmpc-dev flex bison gettext texinfo ncurses-dev autoconf rsync
|
| 7 |
COPY ./app .
|
| 8 |
RUN pip install -r requirements.txt
|
|
|
|
| 9 |
#RUN python load_docs.py
|
| 10 |
RUN --mount=type=secret,id=OPENAI_API_KEY \
|
| 11 |
cat /run/secrets/OPENAI_API_KEY > .openaiapikey
|
|
|
|
| 16 |
RUN chmod 777 /nltk_data
|
| 17 |
RUN mkdir /VectorStore
|
| 18 |
RUN chmod 777 /VectorStore
|
| 19 |
+
RUN ls -la
|
| 20 |
CMD ["streamlit", "run", "app.py", "--server.port=7860"]
|
| 21 |
#CMD ls -la
|
| 22 |
EXPOSE 7860
|
app/load_vectors.py
CHANGED
|
@@ -80,7 +80,7 @@ def load_from_file(files):
|
|
| 80 |
|
| 81 |
def load_from_web(urls, cache=True):
|
| 82 |
docs_list = urls
|
| 83 |
-
filename=f"
|
| 84 |
|
| 85 |
isFile = os.path.isfile(filename)
|
| 86 |
|
|
|
|
| 80 |
|
| 81 |
def load_from_web(urls, cache=True):
|
| 82 |
docs_list = urls
|
| 83 |
+
filename=f"{current_path}/.cache/{sha256(str(urls).encode('utf-8')).hexdigest()}.pkl"
|
| 84 |
|
| 85 |
isFile = os.path.isfile(filename)
|
| 86 |
|