Spaces:
Running
Running
Update inference_test.py
Browse files- inference_test.py +2 -1
inference_test.py
CHANGED
@@ -7,6 +7,7 @@ from service_config import ServiceConfig
|
|
7 |
import intent, intent, llm_model
|
8 |
from log import log
|
9 |
from chat_handler_debug import handle_chat
|
|
|
10 |
|
11 |
s_config = ServiceConfig()
|
12 |
s_config.setup_environment()
|
@@ -76,7 +77,7 @@ def root():
|
|
76 |
|
77 |
@app.post("/start_chat")
|
78 |
def start_chat():
|
79 |
-
if
|
80 |
return {"error": "Model yüklenmedi."}
|
81 |
|
82 |
if not hasattr(app.state, "session_store"):
|
|
|
7 |
import intent, intent, llm_model
|
8 |
from log import log
|
9 |
from chat_handler_debug import handle_chat
|
10 |
+
from llm_model import get_model, get_tokenizer
|
11 |
|
12 |
s_config = ServiceConfig()
|
13 |
s_config.setup_environment()
|
|
|
77 |
|
78 |
@app.post("/start_chat")
|
79 |
def start_chat():
|
80 |
+
if get_model() is None or get_tokenizer() is None:
|
81 |
return {"error": "Model yüklenmedi."}
|
82 |
|
83 |
if not hasattr(app.state, "session_store"):
|