File size: 667 Bytes
5ae7694 | 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 27 28 29 30 31 | """Hugging Face Spaces entry point for the Flask dashboard."""
import os
import sys
if __name__ == "__main__":
# Hugging Face Spaces exposes applications on port 7860.
port = os.environ.setdefault("PORT", "7860")
os.execv(
sys.executable,
[
sys.executable,
"-m",
"gunicorn",
"--bind",
f"0.0.0.0:{port}",
"--workers",
"1",
"--threads",
"4",
"--timeout",
"120",
"app:app",
],
)
from OCx25_dashboard import create_filter_dashboard
app = create_filter_dashboard(start_server=False)
|