[+] Show the hostname

Former-commit-id: 410847656a760fe4c2c310b0d770072392d7aefb
This commit is contained in:
Azalea 2024-11-28 12:25:02 +08:00 committed by GitHub
parent ab9db8b7c7
commit c6a3175bbf

View File

@ -13,6 +13,7 @@
# limitations under the License.
import os
import socket
from ..extras.packages import is_gradio_available
from .common import save_config
@ -35,7 +36,7 @@ if is_gradio_available():
def create_ui(demo_mode: bool = False) -> "gr.Blocks":
engine = Engine(demo_mode=demo_mode, pure_chat=False)
with gr.Blocks(title="LLaMA Board", css=CSS) as demo:
with gr.Blocks(title=f"LLaMA Board ({socket.gethostname()})", css=CSS) as demo:
if demo_mode:
gr.HTML("<h1><center>LLaMA Board: A One-stop Web UI for Getting Started with LLaMA Factory</center></h1>")
gr.HTML(