File tree Expand file tree Collapse file tree 1 file changed +3
-13
lines changed
Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -238,12 +238,10 @@ wait_for_log_update() {
238238 if grep -q -E " Uvicorn running on http://" <<< " $last_line" && \
239239 [ " $current_size " -ne " $last_size " ]; then
240240 if [ " $WEBUI " == " true" ]; then
241- echo -e " \e[32m"
242- echo " Installing gradio..." >&2
241+ echo -e " \e[32mInstalling gradio...\e[0m" >&2
243242 pip install gradio
244- echo " Start gradio webui..." >&2
245- create_web_ui " $host " " $port " " $model_name " >&2
246- echo -e " \e[0m"
243+ echo -e " \e[32mStart gradio webui...\e[0m" >&2
244+ setsid python -u ./gradio_demo/app.py --ip " $host " --port " $port " --model-name " $model_name " | tee -a webui.log &
247245 wait $! # 等待该进程结束
248246 exit 0
249247 else
289287 return 1
290288}
291289
292- create_web_ui () {
293- local ip=" $1 "
294- local port=" $2 "
295- local served_model_name=" $3 "
296-
297- python ./gradio_demo/app.py --ip " $ip " --port " $port " --model-name " $served_model_name "
298- }
299-
300290start_server () {
301291 # 解析传入的参数
302292 local converted_model_path=" $1 "
You can’t perform that action at this time.
0 commit comments