Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -36,7 +36,8 @@ def chat_with_model(prompt, document_section):
|
|
36 |
if len(document_section)>0:
|
37 |
conversation.append({'role': 'assistant', 'content': document_section})
|
38 |
response = openai.ChatCompletion.create(model=model, messages=conversation)
|
39 |
-
return response
|
|
|
40 |
|
41 |
def transcribe_audio(openai_key, file_path, model):
|
42 |
OPENAI_API_URL = "https://api.openai.com/v1/audio/transcriptions"
|
|
|
36 |
if len(document_section)>0:
|
37 |
conversation.append({'role': 'assistant', 'content': document_section})
|
38 |
response = openai.ChatCompletion.create(model=model, messages=conversation)
|
39 |
+
return response
|
40 |
+
#return response['choices'][0]['message']['content']
|
41 |
|
42 |
def transcribe_audio(openai_key, file_path, model):
|
43 |
OPENAI_API_URL = "https://api.openai.com/v1/audio/transcriptions"
|