Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -248,6 +248,11 @@ gr.mount_gradio_app(app, demo, path="/")
|
|
248 |
from fastapi import FastAPI
|
249 |
from ctransformers import AutoModelForCausalLM
|
250 |
from src.core.cognitive_engine import CognitiveEngine
|
|
|
|
|
|
|
|
|
|
|
251 |
|
252 |
# Load LLM model
|
253 |
llm_model = AutoModelForCausalLM.from_pretrained(
|
@@ -258,10 +263,6 @@ llm_model = AutoModelForCausalLM.from_pretrained(
|
|
258 |
temperature=0.7
|
259 |
)
|
260 |
|
261 |
-
# Initialize FastAPI and engine
|
262 |
-
app = FastAPI()
|
263 |
-
cognitive_engine = CognitiveEngine(llm_model)
|
264 |
-
|
265 |
# Routes
|
266 |
@app.get("/status")
|
267 |
def status():
|
|
|
248 |
from fastapi import FastAPI
|
249 |
from ctransformers import AutoModelForCausalLM
|
250 |
from src.core.cognitive_engine import CognitiveEngine
|
251 |
+
cognitive_engine = CognitiveEngine(llm_model)
|
252 |
+
|
253 |
+
# Initialize FastAPI and engine
|
254 |
+
app = FastAPI()
|
255 |
+
cognitive_engine = CognitiveEngine(llm_model)
|
256 |
|
257 |
# Load LLM model
|
258 |
llm_model = AutoModelForCausalLM.from_pretrained(
|
|
|
263 |
temperature=0.7
|
264 |
)
|
265 |
|
|
|
|
|
|
|
|
|
266 |
# Routes
|
267 |
@app.get("/status")
|
268 |
def status():
|