benspigel commited on
Commit
18eb7f2
·
1 Parent(s): 9c3ed64

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,12 +1,12 @@
1
  import gradio as gr
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 = []
 
1
  import gradio as gr
2
+ 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.api_key = api_key
10
 
11
  # Store conversation history
12
  conversation_history = []