eagle0504 commited on
Commit
2644024
1 Parent(s): 86ea792

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -1,10 +1,12 @@
1
  from openai import OpenAI # Assuming Nvidia client is available in the same library, adjust if necessary
2
  import streamlit as st
3
 
 
 
4
  # Initialize Nvidia client
5
  client = OpenAI(
6
  base_url="https://integrate.api.nvidia.com/v1", # Nvidia API endpoint
7
- api_key=st.secrets["NVIDIA_API_KEY"] # Nvidia API Key from Streamlit secrets
8
  )
9
 
10
  st.title("ChatGPT-like clone with Nvidia Model")
 
1
  from openai import OpenAI # Assuming Nvidia client is available in the same library, adjust if necessary
2
  import streamlit as st
3
 
4
+ import os
5
+
6
  # Initialize Nvidia client
7
  client = OpenAI(
8
  base_url="https://integrate.api.nvidia.com/v1", # Nvidia API endpoint
9
+ api_key=os.environ["NVIDIA_API_KEY"] # Nvidia API Key from Streamlit secrets
10
  )
11
 
12
  st.title("ChatGPT-like clone with Nvidia Model")