from init_env import init_env from selenium_parser import load_driver import streamlit as st @st.cache def init(): init_env() @st.cache_resource def get_driver(): return load_driver() def run(): driver.get("https://www.booking.com/hotel/th/queen-boutique.ru.html#tab-reviews") st.write("page loaded") st.image(driver.get_screenshot_as_png(), caption="screenshot") init() driver = get_driver() st.button("Run", on_click=run)