mikaelbhai commited on
Commit
4e06412
1 Parent(s): 2cbea29

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -1,7 +1,9 @@
1
- import openai
2
  import gradio as gr
 
 
3
 
4
- openai.api_key = api_key
 
5
 
6
  messages = [{"role": "system", "content": "you are chatGPT"}]
7
 
 
 
1
  import gradio as gr
2
+ from huggingface_hub import secrets
3
+ import openai
4
 
5
+ # Retrieve the API key from the Secrets Manager
6
+ openai.api_key = secrets.get("api_key")
7
 
8
  messages = [{"role": "system", "content": "you are chatGPT"}]
9