mirror of
https://github.com/Sygil-Dev/sygil-webui.git
synced 2024-12-13 17:33:31 +03:00
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.
This commit is contained in:
parent
16661815fc
commit
6d7d04118a
15
streamlit_webview.py
Normal file
15
streamlit_webview.py
Normal file
@ -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={})
|
Loading…
Reference in New Issue
Block a user