mirror of
https://github.com/QuentinFuxa/WhisperLiveKit.git
synced 2026-03-07 22:33:36 +00:00
13 lines
521 B
Python
13 lines
521 B
Python
import logging
|
|
import importlib.resources as resources
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
def get_web_interface_html():
|
|
"""Loads the HTML for the web interface using importlib.resources."""
|
|
try:
|
|
with resources.files('whisperlivekit.web').joinpath('live_transcription.html').open('r', encoding='utf-8') as f:
|
|
return f.read()
|
|
except Exception as e:
|
|
logger.error(f"Error loading web interface HTML: {e}")
|
|
return "<html><body><h1>Error loading interface</h1></body></html>" |