dtyago commited on
Commit
7b1d846
1 Parent(s): c672e11

Enable GPU laer and CORS setting

Browse files
Files changed (2) hide show
  1. app/main.py +1 -1
  2. app/utils/chat_rag.py +1 -1
app/main.py CHANGED
@@ -20,7 +20,7 @@ app = FastAPI()
20
  # Set all origins to wildcard for simplicity, but we should limit this in production
21
  app.add_middleware(
22
  CORSMiddleware,
23
- allow_origins=["*"],
24
  allow_credentials=True,
25
  allow_methods=["*"],
26
  allow_headers=["*"],
 
20
  # Set all origins to wildcard for simplicity, but we should limit this in production
21
  app.add_middleware(
22
  CORSMiddleware,
23
+ allow_origins=["https://educonnect-debd1.web.app"],
24
  allow_credentials=True,
25
  allow_methods=["*"],
26
  allow_headers=["*"],
app/utils/chat_rag.py CHANGED
@@ -92,7 +92,7 @@ class LlamaModelSingleton:
92
  cls._instance.llm = LlamaCpp(
93
  #streaming = True,
94
  model_path=model_path,
95
- #n_gpu_layers=-1,
96
  n_batch=512,
97
  temperature=0.1,
98
  top_p=1,
 
92
  cls._instance.llm = LlamaCpp(
93
  #streaming = True,
94
  model_path=model_path,
95
+ n_gpu_layers=-1,
96
  n_batch=512,
97
  temperature=0.1,
98
  top_p=1,