Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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=
|
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")
|