mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-08-30 23:56:25 +00:00
fix: Fix the issue of invalid port settings (#1351)
This commit is contained in:
parent
a272d1b8f3
commit
4238a670bf
@ -25,7 +25,7 @@ class Config(metaclass=Singleton):
|
||||
|
||||
# Gradio language version: en, zh
|
||||
self.LANGUAGE = os.getenv("LANGUAGE", "en")
|
||||
self.WEB_SERVER_PORT = int(os.getenv("WEB_SERVER_PORT", 7860))
|
||||
self.WEB_SERVER_PORT = int(os.getenv("WEB_SERVER_PORT", 5000))
|
||||
|
||||
self.debug_mode = False
|
||||
self.skip_reprompt = False
|
||||
|
@ -218,7 +218,7 @@ class WebServerParameters(BaseParameters):
|
||||
default="0.0.0.0", metadata={"help": "Webserver deploy host"}
|
||||
)
|
||||
port: Optional[int] = field(
|
||||
default=5000, metadata={"help": "Webserver deploy port"}
|
||||
default=None, metadata={"help": "Webserver deploy port"}
|
||||
)
|
||||
daemon: Optional[bool] = field(
|
||||
default=False, metadata={"help": "Run Webserver in background"}
|
||||
|
@ -140,6 +140,10 @@ def initialize_app(param: WebServerParameters = None, args: List[str] = None):
|
||||
|
||||
model_name = param.model_name or CFG.LLM_MODEL
|
||||
param.model_name = model_name
|
||||
param.port = param.port or CFG.WEB_SERVER_PORT
|
||||
if not param.port:
|
||||
param.port = 5000
|
||||
|
||||
print(param)
|
||||
|
||||
embedding_model_name = CFG.EMBEDDING_MODEL
|
||||
|
Loading…
Reference in New Issue
Block a user