Update app.py
Browse files
app.py
CHANGED
@@ -4,6 +4,15 @@ import streamlit as st
|
|
4 |
from openai import OpenAI
|
5 |
|
6 |
# Get the API key from the environment settings
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
api_key_nvidia = os.environ.get("api_key_nvidia")
|
8 |
|
9 |
# If there is no API key, show an error message and stop the program
|
|
|
4 |
from openai import OpenAI
|
5 |
|
6 |
# Get the API key from the environment settings
|
7 |
+
|
8 |
+
from dotenv import load_dotenv
|
9 |
+
|
10 |
+
# Load environment variables from .env file
|
11 |
+
load_dotenv()
|
12 |
+
|
13 |
+
# Now retrieve the API key
|
14 |
+
api_key_nvidia = os.getenv("api_key_nvidia")
|
15 |
+
|
16 |
api_key_nvidia = os.environ.get("api_key_nvidia")
|
17 |
|
18 |
# If there is no API key, show an error message and stop the program
|