diff --git a/streamlit_app.py b/streamlit_app.py index 10cef83..ad69f34 100644 --- a/streamlit_app.py +++ b/streamlit_app.py @@ -162,9 +162,9 @@ load_dotenv() # Configure OpenAI -openai.api_key = os.getenv("OPENAI_API_KEY") +openai.api_key = st.secrets["OPENAI_API_KEY"] if not openai.api_key: - raise ValueError("OpenAI API key not found in .env file") + raise ValueError("OpenAI API key not found in Streamlit secrets") def parse_mos_file(file_content: str) -> dict: """