Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -574,6 +574,26 @@ def ai_mastering_chain(audio_path, genre="Pop", target_lufs=-14.0):
|
|
| 574 |
audio.export(out_path, format="wav")
|
| 575 |
return out_path
|
| 576 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 577 |
# === Generate PDF Report – Safely Wrapped ===
|
| 578 |
pdf_available = False
|
| 579 |
try:
|
|
|
|
| 574 |
audio.export(out_path, format="wav")
|
| 575 |
return out_path
|
| 576 |
|
| 577 |
+
def process_audio(audio_path, genre="Pop", target_lufs=-14.0):
|
| 578 |
+
# Your existing processing logic here
|
| 579 |
+
return mastered_audio_path, waveform_image, session_log_json
|
| 580 |
+
|
| 581 |
+
with gr.Blocks(title="Studio Pulse") as demo:
|
| 582 |
+
gr.Interface(fn=process_audio,
|
| 583 |
+
inputs=[
|
| 584 |
+
gr.Audio(label="Upload Track", type="filepath"),
|
| 585 |
+
gr.Textbox(label="Genre", value="Pop"),
|
| 586 |
+
gr.Number(label="Target LUFS", value=-14.0)
|
| 587 |
+
],
|
| 588 |
+
outputs=[
|
| 589 |
+
gr.Audio(label="Mastered Track", type="filepath"),
|
| 590 |
+
gr.Image(label="Waveform"),
|
| 591 |
+
gr.Textbox(label="Session Log")
|
| 592 |
+
])
|
| 593 |
+
|
| 594 |
+
demo.queue()
|
| 595 |
+
app = demo.app
|
| 596 |
+
|
| 597 |
# === Generate PDF Report – Safely Wrapped ===
|
| 598 |
pdf_available = False
|
| 599 |
try:
|