denizaybey commited on
Commit
31b654e
·
1 Parent(s): 44729c9

Fix audio file naming and update dependency version

Browse files

- Correct `dubbed_audio.wav` file path in `batch.put_file` method.
- Pin `modal` to version `1.0.4` in `requirements.txt`.
- Add app initialization with `modal.App`.

Files changed (2) hide show
  1. app.py +2 -1
  2. requirements.txt +2 -2
app.py CHANGED
@@ -19,6 +19,7 @@ def process_audio(original_audio_path, dubbed_audio_path, email, company_name, t
19
  file upload to presigned URLs, and triggering the processing.
20
  """
21
  # 1. Check the duration of both audio files.
 
22
  modal_token_id = os.environ['MODAL_TOKEN_ID']
23
  modal_token_secret = os.environ['MODAL_TOKEN_SECRET']
24
  modal_environment = os.environ['MODAL_ENVIRONMENT']
@@ -45,7 +46,7 @@ def process_audio(original_audio_path, dubbed_audio_path, email, company_name, t
45
  bsodtv_storage = modal.Volume.from_name(modal_volume)
46
  with bsodtv_storage.batch_upload() as batch:
47
  batch.put_file(original_audio_path, "/{}/original_audio.wav".format(processing_id))
48
- batch.put_file(dubbed_audio_path, "/{}/original_audio.wav".format(processing_id))
49
  bsodtv_storage.commit()
50
  except:
51
  return "Error uploading audio files to Cloud Storage."
 
19
  file upload to presigned URLs, and triggering the processing.
20
  """
21
  # 1. Check the duration of both audio files.
22
+ app = modal.App("Waveform-Matching")
23
  modal_token_id = os.environ['MODAL_TOKEN_ID']
24
  modal_token_secret = os.environ['MODAL_TOKEN_SECRET']
25
  modal_environment = os.environ['MODAL_ENVIRONMENT']
 
46
  bsodtv_storage = modal.Volume.from_name(modal_volume)
47
  with bsodtv_storage.batch_upload() as batch:
48
  batch.put_file(original_audio_path, "/{}/original_audio.wav".format(processing_id))
49
+ batch.put_file(dubbed_audio_path, "/{}/dubbed_audio.wav".format(processing_id))
50
  bsodtv_storage.commit()
51
  except:
52
  return "Error uploading audio files to Cloud Storage."
requirements.txt CHANGED
@@ -1,2 +1,2 @@
1
- modal
2
- gradio
 
1
+ modal==1.0.4
2
+ gradio