Spaces:
Running on Zero
Running on Zero
File size: 390 Bytes
a3ab20b bd37cca a3ab20b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | import os
# On Hugging Face Spaces Zero, `spaces` must be imported before CUDA-related modules.
if os.getenv("SPACE_ID"):
try:
import spaces # noqa: F401
except Exception:
pass
from lora_ui import build_ui
app = build_ui()
if __name__ == "__main__":
port = int(os.getenv("PORT", "7860"))
app.launch(server_name="0.0.0.0", server_port=port, share=False)
|