Phoenix21's picture
Deploy LectureLens runtime from GitHub e006f4b1c999
0f1d44a verified
Raw History Blame Contribute Delete
754 Bytes
"""Gradio entry point, usable from this folder or the staged Space root."""
from pathlib import Path
import os
import sys
ROOT = Path(__file__).resolve().parent
if (ROOT.parent / "lecturelens").is_dir():
sys.path.insert(0, str(ROOT.parent))
from space_app.semantic import configure
configure()
from space_app.local_models import configure as configure_local
configure_local()
from space_app.ui import create_app
demo = create_app()
if __name__ == "__main__":
demo.queue(max_size=8, default_concurrency_limit=1).launch(
server_name="0.0.0.0", server_port=int(os.environ.get("PORT", "7860")),
max_file_size="100mb", show_error=False,
ssr_mode=False,
css=(ROOT / "styles.css").read_text(encoding="utf-8"),
)