Spaces:
Runtime error
Runtime error
Commit ·
7b41181
1
Parent(s): 11a75a9
Add TODO comments and update UI text in `app.py`
Browse files- Marked areas requiring updates with TODO comments for endpoints, payloads, and upload accuracy.
- Revised app title and description to align with branding.
28 unmodified lines293031323334353637383918 unmodified lines585960616263649 unmodified lines7475767778798023 unmodified lines10410510610710810911011128 unmodified lines# --- ACTION REQUIRED ---# Please replace the following placeholder URLs with your actual API endpoints.presigned_url_endpoint = "https://your-api.com/get-presigned-urls"processing_endpoint = "https://your-api.com/trigger-processing"# --------------------------# 2.1. Get presigned URLs from your endpoint.payload = {"files": [{"name": os.path.basename(original_audio_path), "type": "audio/wav"},18 unmodified linesexcept KeyError:return "Error: Could not parse the presigned URL response. Please check the JSON structure."# 2.2. Upload the audio files to the presigned URLs.try:print(f"Uploading original file to: {original_upload_url}")with open(original_audio_path, 'rb') as f:9 unmodified linesreturn f"Error uploading files: {e}"# 3. Call the endpoint to trigger the processing.processing_payload = {"email": email,"company_name": company_name,"tolerance": tolerance,23 unmodified linesgr.Slider(0, 100, value=5, label="Tolerance Percentage", info="Set the tolerance for audio comparison.")],outputs=gr.Text(label="Processing Status"),title="Audio Dubbing Verification",description="Upload original and dubbed .wav files (under 30 minutes) to start the verification process.",allow_flagging="never")28 unmodified lines293031323334353637383918 unmodified lines585960616263649 unmodified lines7475767778798023 unmodified lines10410510610710810911011128 unmodified lines# --- ACTION REQUIRED ---# Please replace the following placeholder URLs with your actual API endpoints.presigned_url_endpoint = "https://your-api.com/get-presigned-urls" # TODO: Change URLprocessing_endpoint = "https://your-api.com/trigger-processing" # TODO: Change URL# --------------------------# 2.1. Get presigned URLs from your endpoint. # TODO: Change Payloadpayload = {"files": [{"name": os.path.basename(original_audio_path), "type": "audio/wav"},18 unmodified linesexcept KeyError:return "Error: Could not parse the presigned URL response. Please check the JSON structure."# 2.2. Upload the audio files to the presigned URLs. # TODO: Check for PUT accuracytry:print(f"Uploading original file to: {original_upload_url}")with open(original_audio_path, 'rb') as f:9 unmodified linesreturn f"Error uploading files: {e}"# 3. Call the endpoint to trigger the processing.processing_payload = { # TODO: Change Payload"email": email,"company_name": company_name,"tolerance": tolerance,23 unmodified linesgr.Slider(0, 100, value=5, label="Tolerance Percentage", info="Set the tolerance for audio comparison.")],outputs=gr.Text(label="Processing Status"),title="BSOD.tv - Dub QC Demo",description="Upload original and dubbed .wav files (under 30 minutes) to start the QC process.",allow_flagging="never")
app.py+7-7