Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
@@ -173,6 +173,9 @@ async def transcribe_and_answer(
|
|
173 |
if file.content_type not in ["audio/wav", "audio/mpeg", "audio/mp3", "audio/webm"]:
|
174 |
raise HTTPException(status_code=400, detail="Unsupported audio format. Please upload a WAV or MP3 file.")
|
175 |
|
|
|
|
|
|
|
176 |
# Convert uploaded file to WAV if needed
|
177 |
audio_data = await file.read()
|
178 |
audio_file = io.BytesIO(audio_data)
|
|
|
173 |
if file.content_type not in ["audio/wav", "audio/mpeg", "audio/mp3", "audio/webm"]:
|
174 |
raise HTTPException(status_code=400, detail="Unsupported audio format. Please upload a WAV or MP3 file.")
|
175 |
|
176 |
+
logging.info(f"Received file type: {file.content_type}")
|
177 |
+
logging.info(f"Received questions: {questions}")
|
178 |
+
|
179 |
# Convert uploaded file to WAV if needed
|
180 |
audio_data = await file.read()
|
181 |
audio_file = io.BytesIO(audio_data)
|