Update app.py
Browse files
app.py
CHANGED
|
@@ -131,10 +131,8 @@ def process_media(contents, filename, url):
|
|
| 131 |
|
| 132 |
os.unlink(temp_file_path)
|
| 133 |
|
| 134 |
-
#
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
response = model.generate_content(audio_blob)
|
| 138 |
logger.info("Transcription completed successfully")
|
| 139 |
return response.text
|
| 140 |
except Exception as e:
|
|
|
|
| 131 |
|
| 132 |
os.unlink(temp_file_path)
|
| 133 |
|
| 134 |
+
# Use the audio data directly with the Gemini model
|
| 135 |
+
response = model.generate_content(audio_data)
|
|
|
|
|
|
|
| 136 |
logger.info("Transcription completed successfully")
|
| 137 |
return response.text
|
| 138 |
except Exception as e:
|