move import check furthger up
This commit is contained in:
parent
40ac84aa9a
commit
a84386c311
14
server.py
14
server.py
|
@ -6,6 +6,13 @@ from threading import Thread
|
||||||
|
|
||||||
from flask import Flask, jsonify, render_template, request
|
from flask import Flask, jsonify, render_template, request
|
||||||
|
|
||||||
|
try:
|
||||||
|
import vllm
|
||||||
|
except ModuleNotFoundError as e:
|
||||||
|
print('Could not import vllm-gptq:', e)
|
||||||
|
print('Please see vllm.md for install instructions')
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
import config
|
import config
|
||||||
from llm_server import opts
|
from llm_server import opts
|
||||||
from llm_server.config import ConfigLoader, config_default_vars, config_required_vars, mode_ui_names
|
from llm_server.config import ConfigLoader, config_default_vars, config_required_vars, mode_ui_names
|
||||||
|
@ -20,13 +27,6 @@ from llm_server.routes.v1.generate_stats import generate_stats
|
||||||
from llm_server.stream import init_socketio
|
from llm_server.stream import init_socketio
|
||||||
from llm_server.threads import MainBackgroundThread
|
from llm_server.threads import MainBackgroundThread
|
||||||
|
|
||||||
try:
|
|
||||||
import vllm
|
|
||||||
except ModuleNotFoundError as e:
|
|
||||||
print('Could not import vllm-gptq:', e)
|
|
||||||
print('Please see vllm.md for install instructions')
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
script_path = os.path.dirname(os.path.realpath(__file__))
|
script_path = os.path.dirname(os.path.realpath(__file__))
|
||||||
|
|
||||||
config_path_environ = os.getenv("CONFIG_PATH")
|
config_path_environ = os.getenv("CONFIG_PATH")
|
||||||
|
|
Reference in New Issue