chore: change default server_name

This commit is contained in:
guojianzhu 2024-07-11 13:32:29 +08:00
parent 9cfb0e5ce6
commit 815ca54428
2 changed files with 7 additions and 6 deletions

View File

@ -7,6 +7,7 @@ All configs for user
from dataclasses import dataclass from dataclasses import dataclass
import tyro import tyro
from typing_extensions import Annotated from typing_extensions import Annotated
from typing import Optional
from .base_config import PrintableConfig, make_abs_path from .base_config import PrintableConfig, make_abs_path
@ -43,4 +44,4 @@ class ArgumentConfig(PrintableConfig):
########## gradio arguments ########## ########## gradio arguments ##########
server_port: Annotated[int, tyro.conf.arg(aliases=["-p"])] = 8890 # port for gradio server server_port: Annotated[int, tyro.conf.arg(aliases=["-p"])] = 8890 # port for gradio server
share: bool = False # whether to share the server to public share: bool = False # whether to share the server to public
server_name: str = "0.0.0.0" # server name server_name: Optional[str] = "127.0.0.1" # set the local server name, "0.0.0.0" to broadcast all

View File

@ -12,11 +12,11 @@ import cv2
from .rprint import rlog as log from .rprint import rlog as log
try: # try:
import ffmpeg # import ffmpeg
except ImportError as e: # except ImportError as e:
log(f'Try to install ffmpeg by: pip install ffmpeg-python==0.2.0', style='bold red') # log(f'Try to install ffmpeg by: pip install ffmpeg-python==0.2.0', style='bold red')
raise(e) # raise(e)
from rich.progress import track from rich.progress import track
from .helper import prefix from .helper import prefix