stardate69 commited on
Commit
a85e7a0
·
verified ·
1 Parent(s): 384851f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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
- # Absolute file path
59
- absolute_output_path = os.path.abspath(output_path)
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: