benspigel commited on
Commit
3a76aff
·
1 Parent(s): 4a9526b

Rename Prototype1.py to app.py

Browse files
Files changed (1) hide show
  1. Prototype1.py → app.py +4 -1
Prototype1.py → app.py RENAMED
@@ -2,8 +2,11 @@ import gradio as gr
2
  from openai import OpenAI
3
  import os
4
 
 
 
 
5
  # Initialize the OpenAI client with your API key
6
- client = OpenAI(api_key=os.getenv(os.environ['SECRET_TOKEN']))
7
 
8
  # Store conversation history
9
  conversation_history = []
 
2
  from openai import OpenAI
3
  import os
4
 
5
+ # Retrieve the API key from the environment variable
6
+ api_key = os.environ.get('SECRET_TOKEN')
7
+
8
  # Initialize the OpenAI client with your API key
9
+ client = openai.OpenAI(api_key=api_key)
10
 
11
  # Store conversation history
12
  conversation_history = []