File size: 696 Bytes
1af0726
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import os
from pathlib import Path

import gradio as gr

# Hard-disable the Run Pipeline tab for this app entrypoint
os.environ["ENABLE_RUN_PIPELINE_TAB"] = "0"

from stringsight.dashboard import state
from stringsight.dashboard.app import create_app


# Point the dashboard to the repository's ./data directory
state.BASE_RESULTS_DIR = str((Path(__file__).parent / "data").resolve())

# Build the Gradio application; expose for Spaces
demo: gr.Blocks = create_app()
app: gr.Blocks = demo


if __name__ == "__main__":
    # Local launch settings; Spaces will auto-serve the "demo/app" object
    port = int(os.environ.get("PORT", 7860))
    demo.launch(server_name="0.0.0.0", server_port=port)