Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -302,8 +302,8 @@ async def download_wav_file_by_index(file_index: int, repo_file_full_path: str)
|
|
| 302 |
|
| 303 |
async def upload_transcription_to_hf(wav_filename: str, transcription_data: Dict) -> bool:
|
| 304 |
"""Uploads the transcription JSON file to the output dataset."""
|
| 305 |
-
# Use the WAV
|
| 306 |
-
json_filename =
|
| 307 |
|
| 308 |
try:
|
| 309 |
print(f"[{FLOW_ID}] Uploading transcription for {wav_filename} as {json_filename} to {HF_OUTPUT_DATASET_ID}...")
|
|
|
|
| 302 |
|
| 303 |
async def upload_transcription_to_hf(wav_filename: str, transcription_data: Dict) -> bool:
|
| 304 |
"""Uploads the transcription JSON file to the output dataset."""
|
| 305 |
+
# Use the full WAV path, replacing slashes with underscores and extension with .json
|
| 306 |
+
json_filename = wav_filename.replace('/', '_').replace('\\', '_').rsplit('.', 1)[0] + '.json'
|
| 307 |
|
| 308 |
try:
|
| 309 |
print(f"[{FLOW_ID}] Uploading transcription for {wav_filename} as {json_filename} to {HF_OUTPUT_DATASET_ID}...")
|