Hotfix/ locking when deploying streamlit app (#5261)

* fix locking when deploying streamlit app

* Update streamlit_run.py

* Update streamlit_run.py
This commit is contained in:
teh_coderer
2023-07-28 21:13:42 -05:00
committed by GitHub
parent 73348c0872
commit dc30ab3d36
2 changed files with 10 additions and 7 deletions

View File

@@ -72,11 +72,11 @@ class DummyBackend:
and get_current_system().LOGGING_SUB_APP != "sdk"
):
console.print(pywry_missing)
if console.input(
"If you prefer to continue without interactive plots/tables, "
"press [green]enter[/] or [red]ctrl+c[/] to exit."
):
dotenv.set_key(SETTINGS_ENV_FILE, "PLOT_ENABLE_PYWRY", "0")
console.print(
"\n\nContinuing with default plotly behaviour (open in browser).",
style="yellow",
)
dotenv.set_key(SETTINGS_ENV_FILE, "PLOT_ENABLE_PYWRY", "0")
current_user.preferences.USE_INTERACTIVE_DF = False
set_current_user(current_user)

View File

@@ -5,9 +5,12 @@ from pathlib import Path
import streamlit.web.bootstrap
from openbb_terminal.core.config.paths import REPOSITORY_DIRECTORY
from openbb_terminal.core.plots.plotly_helper import theme
from openbb_terminal.core.session.current_system import set_system_variable
from openbb_terminal.core.session.current_user import set_preference
theme.apply_style("dark")
set_system_variable("LOGGING_SUPPRESS", True)
set_preference("CHART_STYLE", "dark")
set_preference("PLOT_ENABLE_PYWRY", "False")
def main():