2022-10-27 03:47:13 +03:00
|
|
|
import os, webview
|
|
|
|
from streamlit.web import bootstrap
|
|
|
|
from streamlit import config as _config
|
|
|
|
|
2023-06-23 05:58:20 +03:00
|
|
|
webview.create_window(
|
|
|
|
"Sygil", "http://localhost:8501", width=1000, height=800, min_size=(500, 500)
|
|
|
|
)
|
2022-10-27 03:47:13 +03:00
|
|
|
webview.start()
|
|
|
|
|
|
|
|
dirname = os.path.dirname(__file__)
|
2023-06-23 05:58:20 +03:00
|
|
|
filename = os.path.join(dirname, "scripts/webui_streamlit.py")
|
2022-10-27 03:47:13 +03:00
|
|
|
|
|
|
|
_config.set_option("server.headless", True)
|
|
|
|
args = []
|
|
|
|
|
2023-06-23 05:58:20 +03:00
|
|
|
# streamlit.cli.main_run(filename, args)
|
|
|
|
bootstrap.run(filename, "", args, flag_options={})
|