From 6d7d04118ad759075df2e8ac16af3e972c1fe67b Mon Sep 17 00:00:00 2001 From: ZeroCool940711 Date: Wed, 26 Oct 2022 17:47:13 -0700 Subject: [PATCH] Added a webview script that launches the streamlit server and then a small GUI, this should help for those that do not want to use the browser and want to run the UI natively. --- streamlit_webview.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 streamlit_webview.py diff --git a/streamlit_webview.py b/streamlit_webview.py new file mode 100644 index 0000000..9853c4e --- /dev/null +++ b/streamlit_webview.py @@ -0,0 +1,15 @@ +import os, webview +from streamlit.web import bootstrap +from streamlit import config as _config + +webview.create_window('Sygil', 'http://localhost:8501', width=1000, height=800, min_size=(500, 500)) +webview.start() + +dirname = os.path.dirname(__file__) +filename = os.path.join(dirname, 'scripts/webui_streamlit.py') + +_config.set_option("server.headless", True) +args = [] + +#streamlit.cli.main_run(filename, args) +bootstrap.run(filename,'',args, flag_options={}) \ No newline at end of file