Detect if PYLUME_HOST is set

This commit is contained in:
Dillon DuPont
2025-06-19 09:44:59 -04:00
parent 552e3c550c
commit ee97e4cbb5

View File

@@ -133,8 +133,11 @@ class GradioChatScreenshotHandler(DefaultCallbackHandler):
is_mac = platform.system().lower() == "darwin"
# Detect if lume is available (host device is macOS)
is_arm64 = platform.machine().lower() == "arm64"
is_lume_available = is_mac or (is_arm64 and os.environ.get("LUME_HOST", "localhost") != "localhost")
is_lume_available = is_mac or (os.environ.get("PYLUME_HOST", "localhost") != "localhost")
print("PYLUME_HOST: ", os.environ.get("PYLUME_HOST", "localhost"))
print("is_mac: ", is_mac)
print("Lume available: ", is_lume_available)
# Map model names to specific provider model names
MODEL_MAPPINGS = {