kotrotsos commited on
Commit
05471ce
·
1 Parent(s): bd7b5f9

fixed shared state

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
  import os
4
  openai.api_key = os.environ.get("openai_key")
5
- messages = [ { "role": "system", "content":"You are a helpful therapist. I am very concise and give short answers."} ]
6
 
7
  def transcribe(audio):
8
- global messages
 
9
  audio_file = open(audio, "rb")
10
  transcript = openai.Audio.transcribe("whisper-1", audio_file)
11
 
 
2
  import gradio as gr
3
  import os
4
  openai.api_key = os.environ.get("openai_key")
 
5
 
6
  def transcribe(audio):
7
+ messages = [ { "role": "system", "content":"You are a helpful therapist. I am very concise and give short answers."} ]
8
+ system_message = ""
9
  audio_file = open(audio, "rb")
10
  transcript = openai.Audio.transcribe("whisper-1", audio_file)
11