Skip to content

Commit

Permalink
add update
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromehardaway committed Nov 6, 2024
1 parent 3bc4e23 commit d7b4a0d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,14 @@
# Load environment variables
load_dotenv()

# Configure OpenAI
openai.api_key = os.getenv("OPENAI_API_KEY")
openai.api_key = st.secrets["openai"]["OPENAI_API_KEY"]

# Optionally, load the model name if needed
model_name = st.secrets["openai"].get("model_name", "default_model_name")

# Test the setup
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:
"""
Expand Down

0 comments on commit d7b4a0d

Please sign in to comment.