Skip to content

Commit

Permalink
Update web server
Browse files Browse the repository at this point in the history
  • Loading branch information
haotian-liu committed Oct 8, 2023
1 parent 0a7f494 commit 03fcfe8
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions llava/serve/gradio_web_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ def build_demo(embed_mode):
flag_btn = gr.Button(value="⚠️ Flag", interactive=False)
#stop_btn = gr.Button(value="⏹️ Stop Generation", interactive=False)
regenerate_btn = gr.Button(value="🔄 Regenerate", interactive=False)
clear_btn = gr.Button(value="🗑️ Clear history", interactive=False)
clear_btn = gr.Button(value="🗑️ Clear", interactive=False)

if not embed_mode:
gr.Markdown(tos_markdown)
Expand Down Expand Up @@ -397,7 +397,7 @@ def build_demo(embed_mode):
parser.add_argument("--host", type=str, default="0.0.0.0")
parser.add_argument("--port", type=int)
parser.add_argument("--controller-url", type=str, default="http://localhost:21001")
parser.add_argument("--concurrency-count", type=int, default=8)
parser.add_argument("--concurrency-count", type=int, default=10)
parser.add_argument("--model-list-mode", type=str, default="once",
choices=["once", "reload"])
parser.add_argument("--share", action="store_true")
Expand All @@ -410,6 +410,11 @@ def build_demo(embed_mode):

logger.info(args)
demo = build_demo(args.embed)
demo.queue(concurrency_count=args.concurrency_count, status_update_rate=10,
api_open=False).launch(
server_name=args.host, server_port=args.port, share=args.share)
demo.queue(
concurrency_count=args.concurrency_count,
api_open=False
).launch(
server_name=args.host,
server_port=args.port,
share=args.share
)

0 comments on commit 03fcfe8

Please sign in to comment.