Spaces:
Runtime error
Runtime error
fixed shared state
Browse files
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 |
-
|
|
|
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 |
|