I am trying to start the Streamlit application using
import os
os.popen("streamlit run stockXchange.py")
When I run this code, there will be an infinite number of streamlit windows, popping up one after another every 3 or so seconds. The only way to stop these windows from popping up is by closing the output window completely. (I am using PyCharm)
Here is my code:
import os
import streamlit as st
class Streamlit:
def __init__(self):
Streamlit.setup()
def setup(self):
st.title("StockXchange GUI")
query = st.text_input("Enter company name:")
if st.button("Go"):
#calls the application function
load(query)
if __name__ == "__main__":
print(starttext)
print(os.popen("streamlit run stockXchange.py").read())
#Workaround 'missing 1 required positional argument: 'self'' Error
Streamlit.setup(Streamlit)
I want there to only be one window popping up, not an infinite number of windows.
Is there any way to fix this?