Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -54,12 +54,12 @@ def generate_audio():
|
|
| 54 |
output_filename = "output.wav"
|
| 55 |
output_path = os.path.join(OUTPUT_PATH, output_filename)
|
| 56 |
sf.write(output_path, output_audio, pipe.vae.sampling_rate)
|
| 57 |
-
|
| 58 |
-
#
|
| 59 |
-
|
| 60 |
|
| 61 |
# Return the WAV file
|
| 62 |
-
return jsonify({"file_path": absolute_output_path}), 200
|
| 63 |
|
| 64 |
|
| 65 |
except Exception as e:
|
|
|
|
| 54 |
output_filename = "output.wav"
|
| 55 |
output_path = os.path.join(OUTPUT_PATH, output_filename)
|
| 56 |
sf.write(output_path, output_audio, pipe.vae.sampling_rate)
|
| 57 |
+
|
| 58 |
+
# Send the file for download
|
| 59 |
+
return send_file(output_path, as_attachment=True)
|
| 60 |
|
| 61 |
# Return the WAV file
|
| 62 |
+
#return jsonify({"file_path": absolute_output_path}), 200
|
| 63 |
|
| 64 |
|
| 65 |
except Exception as e:
|