File size: 754 Bytes
c7918d3
 
 
 
 
 
 
 
 
b39b72f
 
 
0f1d44a
 
c7918d3
 
 
 
 
 
 
 
c5312f1
c7918d3
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
"""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"),
    )