Spaces:
Runtime error
Runtime error
5th
Browse files- Dockerfile +2 -1
- main.py +4 -4
Dockerfile
CHANGED
@@ -56,4 +56,5 @@ ENV HOME=/home/user \
|
|
56 |
COPY --chown=user . /home/user/app
|
57 |
|
58 |
# Run the start script
|
59 |
-
CMD ["/app/start_server.sh"]
|
|
|
|
56 |
COPY --chown=user . /home/user/app
|
57 |
|
58 |
# Run the start script
|
59 |
+
#CMD ["/app/start_server.sh"]
|
60 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
main.py
CHANGED
@@ -33,7 +33,7 @@ logger = logging.getLogger(__name__)
|
|
33 |
|
34 |
# Initialize FastAPI app
|
35 |
app = FastAPI()
|
36 |
-
NGROK_TOKEN = "2aQUM6MDkhjcPEBbIFTiu4cZBBr_sMMei8h5yejFbxFeMFuQ" # Replace with your NGROK token
|
37 |
#MODEL_NAME = "/opt/Llama-2-13B-chat-GPTQ"
|
38 |
#MODEL_NAME = "MediaTek-Research/Breeze-7B-Instruct-64k-v0.1"
|
39 |
MODEL_NAME = "codellama/CodeLlama-7b-Instruct-hf"
|
@@ -215,7 +215,7 @@ def setup_chain():
|
|
215 |
setup_chain()
|
216 |
###############
|
217 |
|
218 |
-
if __name__ == "__main__":
|
219 |
|
220 |
# if NGROK_TOKEN is not None:
|
221 |
# ngrok.set_auth_token(NGROK_TOKEN)
|
@@ -227,6 +227,6 @@ if __name__ == "__main__":
|
|
227 |
# print("You can use {}/predict to get the assistant result.".format(public_url))
|
228 |
# logger.info("You can use {}/predict to get the assistant result.".format(public_url))
|
229 |
|
230 |
-
nest_asyncio.apply()
|
231 |
-
uvicorn.run(app, port=8000)
|
232 |
|
|
|
33 |
|
34 |
# Initialize FastAPI app
|
35 |
app = FastAPI()
|
36 |
+
#NGROK_TOKEN = "2aQUM6MDkhjcPEBbIFTiu4cZBBr_sMMei8h5yejFbxFeMFuQ" # Replace with your NGROK token
|
37 |
#MODEL_NAME = "/opt/Llama-2-13B-chat-GPTQ"
|
38 |
#MODEL_NAME = "MediaTek-Research/Breeze-7B-Instruct-64k-v0.1"
|
39 |
MODEL_NAME = "codellama/CodeLlama-7b-Instruct-hf"
|
|
|
215 |
setup_chain()
|
216 |
###############
|
217 |
|
218 |
+
#if __name__ == "__main__":
|
219 |
|
220 |
# if NGROK_TOKEN is not None:
|
221 |
# ngrok.set_auth_token(NGROK_TOKEN)
|
|
|
227 |
# print("You can use {}/predict to get the assistant result.".format(public_url))
|
228 |
# logger.info("You can use {}/predict to get the assistant result.".format(public_url))
|
229 |
|
230 |
+
#nest_asyncio.apply()
|
231 |
+
#uvicorn.run(app, port=8000)
|
232 |
|