Skip to content

Commit 98dc6fa

Browse files
committed
Merge branch 'main' into release/2.4
2 parents b7731bc + c94b2e6 commit 98dc6fa

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

docs/source/Instruction/命令行参数.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,6 @@ deploy参数继承了infer参数, 除此之外增加了以下参数:
437437
## web-ui 参数
438438

439439
- `--🔥host`: 默认为`'127.0.0.1'`. 要使其在非本机上可访问, 可设置为'0.0.0.0'.
440-
- `--port`: 默认为`None`.
440+
- `--port`: 默认为`7860`.
441441
- `--lang`: 默认为`'zh'`.
442442
- `--share`: 默认为`False`.

docs/source_en/Instruction/Command-line-parameters.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,6 @@ deploy parameters inherit from infer parameters, with the following added parame
437437
## web-ui Parameters
438438

439439
- `--🔥host`: Default `'127.0.0.1'`. To make it accessible on the local network, you can set it to '0.0.0.0'.
440-
- `--port`: Default `None`.
440+
- `--port`: Default `7860`.
441441
- `--lang`: Default `'zh'`.
442442
- `--share`: Default `False`.

swift/llm/utils/argument.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1799,7 +1799,7 @@ class WebuiArguments:
17991799
share: bool = False
18001800
lang: str = 'zh'
18011801
host: str = '127.0.0.1'
1802-
port: Optional[int] = None
1802+
port: int = 7860
18031803

18041804

18051805
@dataclass

swift/utils/run_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def x_main(argv: Union[List[str], _TArgsClass, NoneType] = None, **kwargs) -> _T
2828
from swift.llm import AppUIArguments, WebuiArguments
2929
if (isinstance(args, (AppUIArguments, WebuiArguments)) and 'JUPYTER_NAME' in os.environ
3030
and 'dsw-' in os.environ['JUPYTER_NAME'] and 'GRADIO_ROOT_PATH' not in os.environ):
31-
os.environ['GRADIO_ROOT_PATH'] = f"/{os.environ['JUPYTER_NAME']}/proxy/7860"
31+
os.environ['GRADIO_ROOT_PATH'] = f"/{os.environ['JUPYTER_NAME']}/proxy/{args.port}"
3232
result = llm_x(args, **kwargs)
3333
logger.info(f'End time of running main: {datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f")}')
3434
return result

0 commit comments

Comments
 (0)