Spaces:
Runtime error
Runtime error
Merge branch 'modal-integration-fix' into 'main'
Browse filesFix audio file naming and update dependency version
See merge request sonne-technology/bsod-tv/waveform-matching-gradio-front-end!14
Files changed (2)
- app.py+7-6
- requirements.txt+2-2
18 unmodified lines1920212223242520 unmodified lines4647484849505152226 unmodified lines27928028128128228328328428528628728728828828929029129213 unmodified lines30630730830830931031131218 unmodified lines file upload to presigned URLs, and triggering the processing. """ # 1. Check the duration of both audio files. app = modal.App("Waveform-Matching") modal_token_id = os.environ['MODAL_TOKEN_ID'] modal_token_secret = os.environ['MODAL_TOKEN_SECRET'] modal_environment = os.environ['MODAL_ENVIRONMENT']20 unmodified lines bsodtv_storage = modal.Volume.from_name(modal_volume) with bsodtv_storage.batch_upload() as batch: batch.put_file(original_audio_path, "/{}/original_audio.wav".format(processing_id)) batch.put_file(dubbed_audio_path, "/{}/original_audio.wav".format(processing_id)) batch.put_file(dubbed_audio_path, "/{}/dubbed_audio.wav".format(processing_id)) bsodtv_storage.commit() except: return "Error uploading audio files to Cloud Storage."226 unmodified lines # Second Row: 2/3 Email Input 1/3 Company Name Input with gr.Row(elem_classes="input-section"): with gr.Column(scale=2): email = gr.Textbox(label="Email") _email = gr.Textbox(label="Email") with gr.Column(scale=1): company_name = gr.Textbox(label="Company Name") _company_name = gr.Textbox(label="Company Name")
# Third Row: Tolerance Percentage with gr.Row(elem_classes="input-section"): tolerance = gr.Slider(0, 100, value=5, label="Tolerance Percentage", info="Set the tolerance for audio comparison.") _tolerance = gr.Slider(0, 100, value=5, label="Tolerance Percentage", info="Set the tolerance for audio comparison.")
# Fourth Row: Processing Status with gr.Row(elem_classes="output-section"):13 unmodified lines # Set up the processing function submit_btn.click( fn=process_audio, inputs=[original_audio, dubbed_audio, email, company_name, tolerance], inputs=[original_audio, dubbed_audio, _email, _company_name, _tolerance], outputs=output )
1212modalgradiomodal==1.0.4gradioapp.py+7-6
requirements.txt+2-2