Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -76,7 +76,7 @@ def api_calling(audio_file, prompt, api_key):
|
|
76 |
}
|
77 |
response = requests.post("https://api.openai.com/v1/chat/completions", headers=headers, json=payload)
|
78 |
audio_text_res = response.json()
|
79 |
-
return audio_text_res
|
80 |
|
81 |
|
82 |
|
|
|
76 |
}
|
77 |
response = requests.post("https://api.openai.com/v1/chat/completions", headers=headers, json=payload)
|
78 |
audio_text_res = response.json()
|
79 |
+
return audio_text_res["choices"][0]["message"]["content"]
|
80 |
|
81 |
|
82 |
|