Commit ·
e0f03d9
1
Parent(s): 801c096
Changed the api and gave permissions to make directory same local model
Browse files- Dockerfile +4 -0
- backend/app.py +1 -1
Dockerfile
CHANGED
|
@@ -31,6 +31,10 @@ ENV HOME=/app
|
|
| 31 |
ENV HF_HOME /app/.cache/huggingface
|
| 32 |
RUN mkdir -p ${HF_HOME} && chown -R 1000:1000 ${HF_HOME}
|
| 33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
# Tell the container to listen on the port provided by Cloud Run
|
| 35 |
EXPOSE 7860
|
| 36 |
|
|
|
|
| 31 |
ENV HF_HOME /app/.cache/huggingface
|
| 32 |
RUN mkdir -p ${HF_HOME} && chown -R 1000:1000 ${HF_HOME}
|
| 33 |
|
| 34 |
+
# Create and set permissions for the GPT4All cache directory
|
| 35 |
+
RUN mkdir -p /app/.cache/gpt4all && \
|
| 36 |
+
chown -R 1000:1000 /app/.cache/gpt4all
|
| 37 |
+
|
| 38 |
# Tell the container to listen on the port provided by Cloud Run
|
| 39 |
EXPOSE 7860
|
| 40 |
|
backend/app.py
CHANGED
|
@@ -303,7 +303,7 @@ def ask_question_endpoint():
|
|
| 303 |
try:
|
| 304 |
chat_completion = api_llm.chat.completions.create(
|
| 305 |
messages=[{"role": "user", "content": prompt}],
|
| 306 |
-
model="llama3-
|
| 307 |
temperature=0.5, max_tokens=250
|
| 308 |
)
|
| 309 |
response = chat_completion.choices[0].message.content
|
|
|
|
| 303 |
try:
|
| 304 |
chat_completion = api_llm.chat.completions.create(
|
| 305 |
messages=[{"role": "user", "content": prompt}],
|
| 306 |
+
model="llama3-70b-8192", # Use a current, supported model
|
| 307 |
temperature=0.5, max_tokens=250
|
| 308 |
)
|
| 309 |
response = chat_completion.choices[0].message.content
|