Sergidev commited on
Commit
b1dc75c
1 Parent(s): 38cbbbe

Fix app for frontend

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -2,6 +2,7 @@ from fastapi import FastAPI, Request
2
  from fastapi.responses import HTMLResponse, StreamingResponse
3
  from fastapi.templating import Jinja2Templates
4
  from pmbl import PMBL
 
5
 
6
  app = FastAPI()
7
  pmbl = PMBL("./PMB-7b.Q6_K.gguf") # Replace with the path to your model
@@ -39,4 +40,4 @@ if __name__ == "__main__":
39
  import asyncio
40
 
41
  loop = asyncio.get_event_loop()
42
- loop.run_until_complete(uvicorn.run(app, host="0.0.0.0", port=1771))
 
2
  from fastapi.responses import HTMLResponse, StreamingResponse
3
  from fastapi.templating import Jinja2Templates
4
  from pmbl import PMBL
5
+ import os
6
 
7
  app = FastAPI()
8
  pmbl = PMBL("./PMB-7b.Q6_K.gguf") # Replace with the path to your model
 
40
  import asyncio
41
 
42
  loop = asyncio.get_event_loop()
43
+ loop.run_until_complete(uvicorn.run(app, host="0.0.0.0", port=int(os.environ.get("PORT", 8000))))