dylanmeca commited on
Commit
71bae19
·
1 Parent(s): c7c6aaa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -2,10 +2,10 @@ import openai
2
  import gradio as gr
3
 
4
  model_id = "gpt-3.5-turbo"
 
5
 
6
  # Getting responses using the OpenAI API
7
- def answer_chatgpt(api_key, message, history, conversation=[]):
8
- global conversation
9
  history = history or []
10
  prompt = f"{message}"
11
  conversation.append({"role": "user", "content": f"{prompt}"})
 
2
  import gradio as gr
3
 
4
  model_id = "gpt-3.5-turbo"
5
+ conversation = []
6
 
7
  # Getting responses using the OpenAI API
8
+ def answer_chatgpt(api_key, message, history):
 
9
  history = history or []
10
  prompt = f"{message}"
11
  conversation.append({"role": "user", "content": f"{prompt}"})