From 815ca5442838e7e3269224adc16bdfaaa90c3443 Mon Sep 17 00:00:00 2001 From: guojianzhu Date: Thu, 11 Jul 2024 13:32:29 +0800 Subject: [PATCH] chore: change default server_name --- src/config/argument_config.py | 3 ++- src/utils/video.py | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/config/argument_config.py b/src/config/argument_config.py index 1f7f223..0bbaa20 100644 --- a/src/config/argument_config.py +++ b/src/config/argument_config.py @@ -7,6 +7,7 @@ All configs for user from dataclasses import dataclass import tyro from typing_extensions import Annotated +from typing import Optional from .base_config import PrintableConfig, make_abs_path @@ -43,4 +44,4 @@ class ArgumentConfig(PrintableConfig): ########## gradio arguments ########## server_port: Annotated[int, tyro.conf.arg(aliases=["-p"])] = 8890 # port for gradio server 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 diff --git a/src/utils/video.py b/src/utils/video.py index d32b002..a698412 100644 --- a/src/utils/video.py +++ b/src/utils/video.py @@ -12,11 +12,11 @@ import cv2 from .rprint import rlog as log -try: - import ffmpeg -except ImportError as e: - log(f'Try to install ffmpeg by: pip install ffmpeg-python==0.2.0', style='bold red') - raise(e) +# try: +# import ffmpeg +# except ImportError as e: +# log(f'Try to install ffmpeg by: pip install ffmpeg-python==0.2.0', style='bold red') +# raise(e) from rich.progress import track from .helper import prefix