Spaces:
Build error
Build error
heikowagner
commited on
Commit
•
19b8811
1
Parent(s):
578a5f5
Delete chroma-embeddings.parquet.tmp
Browse files- .gitignore +1 -0
- Dockerfile +1 -1
- app/run.py +5 -3
.gitignore
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
./docker/zeppelin/logs/*
|
|
|
2 |
*.log
|
3 |
*.log.*
|
4 |
*__pycache__*
|
|
|
1 |
./docker/zeppelin/logs/*
|
2 |
+
*.openaiapikey*
|
3 |
*.log
|
4 |
*.log.*
|
5 |
*__pycache__*
|
Dockerfile
CHANGED
@@ -9,7 +9,7 @@ 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 > .
|
13 |
RUN python run.py
|
14 |
RUN mkdir /.cache
|
15 |
RUN chmod 777 /.cache
|
|
|
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
|
13 |
RUN python run.py
|
14 |
RUN mkdir /.cache
|
15 |
RUN chmod 777 /.cache
|
app/run.py
CHANGED
@@ -1,10 +1,12 @@
|
|
1 |
# %%
|
|
|
|
|
|
|
|
|
|
|
2 |
import load_model
|
3 |
import cloudpickle
|
4 |
-
import os
|
5 |
|
6 |
-
with open('.openapikey', 'r') as reader:
|
7 |
-
os.environ['OPEN_API_KEY']=reader.read()
|
8 |
# %%
|
9 |
# llm = load_model.load_gpu_model("decapoda-research/llama-7b-hf")
|
10 |
llm= load_model.load_openai_model()
|
|
|
1 |
# %%
|
2 |
+
import os
|
3 |
+
import pathlib
|
4 |
+
current_path = str( pathlib.Path(__file__).parent.resolve() )
|
5 |
+
with open(current_path+'/.openaiapikey', 'r') as reader:
|
6 |
+
os.environ['OPENAI_API_KEY']=reader.read()
|
7 |
import load_model
|
8 |
import cloudpickle
|
|
|
9 |
|
|
|
|
|
10 |
# %%
|
11 |
# llm = load_model.load_gpu_model("decapoda-research/llama-7b-hf")
|
12 |
llm= load_model.load_openai_model()
|