Skip to content

Commit e8176cf

Browse files
committed
Improved Running and Initializing banner
1 parent 360c113 commit e8176cf

File tree

5 files changed

+36
-30
lines changed

5 files changed

+36
-30
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
All notable changes to LocalLab will be documented in this file.
44

5+
## [0.5.5] - 2024-04-30
6+
7+
### Fixed
8+
9+
- Fixed extra spacing in the boundary of status banners
10+
- Improved alignment of INITIALIZING and RUNNING status boxes
11+
- Enhanced visual consistency across all UI elements
12+
513
## [0.5.4] - 2024-04-30
614

715
### Improved

locallab/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
LocalLab - A lightweight AI inference server for running LLMs locally
33
"""
44

5-
__version__ = "0.5.4" # Updated to match setup.py
5+
__version__ = "0.5.5" # Updated to match setup.py
66

77
# Only import what's necessary initially, lazy-load the rest
88
from .logger import get_logger

locallab/ui/banners.py

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,13 @@ def print_initializing_banner(version: str = "0.4.25"):
2828
╚══════╝ ╚═════╝ ╚═════╝╚═╝ ╚═╝╚══════╝╚══════╝╚═╝ ╚═╝╚═════╝
2929
{Style.RESET_ALL}
3030
31-
{Fore.YELLOW}
32-
╔═══════════════════════════════════════════════════════════════╗
33-
║ ⚠️ INITIALIZING ⚠️ ║
34-
║ ║
35-
║ • Server is starting up - please wait ║
36-
║ • Do not make API requests yet ║
37-
║ • Wait for the "RUNNING" banner to appear ║
38-
╚═══════════════════════════════════════════════════════════════╝
31+
{Fore.YELLOW}▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
32+
⚠️ INITIALIZING ⚠️
33+
34+
• Server is starting up - please wait
35+
• Do not make API requests yet
36+
• Wait for the "RUNNING" banner to appear
37+
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
3938
{Style.RESET_ALL}
4039
4140
{Fore.CYAN}════════════════════════════════════════════════════════════════════════{Style.RESET_ALL}
@@ -67,15 +66,14 @@ def print_running_banner(version: str):
6766
███████╗╚██████╔╝╚██████╗██║ ██║███████╗███████╗██║ ██║██████╔╝
6867
╚══════╝ ╚═════╝ ╚═════╝╚═╝ ╚═╝╚══════╝╚══════╝╚═╝ ╚═╝╚═════╝
6968
{Style.RESET_ALL}
70-
{Fore.GREEN}
71-
╔═══════════════════════════════════════════════════════════════╗
72-
║ ✅ RUNNING ✅ ║
73-
║ ║
74-
║ • Server is ready - you can now make API requests ║
75-
║ • Prefer to use the client packages for easier interaction ║
76-
║ • Model loading will continue in the background ║
77-
║ • API documentation is available below ║
78-
╚═══════════════════════════════════════════════════════════════╝
69+
{Fore.GREEN}▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
70+
✅ RUNNING ✅
71+
72+
• Server is ready - you can now make API requests
73+
• Prefer to use the client packages for easier interaction
74+
• Model loading will continue in the background
75+
• API documentation is available below
76+
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
7977
{Style.RESET_ALL}
8078
8179
{Fore.CYAN}════════════════════════════════════════════════════════════════════════{Style.RESET_ALL}

locallab/utils/networking.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,24 +53,24 @@ def setup_ngrok(port: int) -> Optional[str]:
5353
url_length = len(public_url)
5454
banner_width = max(80, url_length + 20) # Add padding for aesthetics
5555

56-
# Create dynamic width horizontal lines
57-
h_line = "═" * (banner_width - 2)
56+
# Create dynamic width horizontal lines with thicker borders
57+
h_line_top = "▄" * banner_width
58+
h_line_bottom = "▀" * banner_width
5859

59-
# Create centered title with proper padding
60+
# Create centered title
6061
title = "✨ NGROK TUNNEL ACTIVE ✨"
61-
title_padding = (banner_width - len(title) - 2) // 2
62+
title_padding = (banner_width - len(title)) // 2
6263
padded_title = " " * title_padding + title + " " * title_padding
6364
# Adjust if odd number
64-
if len(padded_title) < banner_width - 2:
65+
if len(padded_title) < banner_width:
6566
padded_title += " "
6667

67-
# Display banner
68+
# Display banner with no side borders and prominent top/bottom borders
6869
logger.info(f"""
69-
{Fore.CYAN}{h_line}{Style.RESET_ALL}
70-
{Fore.CYAN}{padded_title}{Style.RESET_ALL}
71-
{Fore.CYAN}{h_line}{Style.RESET_ALL}
72-
{Fore.CYAN}{Style.RESET_ALL} {Fore.GREEN}Public URL:{Style.RESET_ALL} {Fore.YELLOW}{public_url}{Style.RESET_ALL}{" " * (banner_width - len(public_url) - 14)}{Fore.CYAN}{Style.RESET_ALL}
73-
{Fore.CYAN}{h_line}{Style.RESET_ALL}
70+
{Fore.CYAN}{h_line_top}{Style.RESET_ALL}
71+
{Fore.CYAN}{padded_title}{Style.RESET_ALL}
72+
{Fore.GREEN}Public URL: {Fore.YELLOW}{public_url}{Style.RESET_ALL}
73+
{Fore.CYAN}{h_line_bottom}{Style.RESET_ALL}
7474
""")
7575
return public_url
7676

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747

4848
setup(
4949
name="locallab",
50-
version="0.5.4",
50+
version="0.5.5",
5151
packages=find_packages(include=["locallab", "locallab.*"]),
5252
install_requires=install_requires,
5353
extras_require={

0 commit comments

Comments
 (0)