Update main.py
Browse files181 unmodified lines18218318418518618718818919019121 unmodified lines213214215216217218219181 unmodified lines# semaphore = asyncio.Semaphore(1)async def send_video_for_transcription(file: UploadFile, hash_path: str):# async with semaphore:try:logging.info(f"Background task: sending video {file.filename} for transcription")run_time = api.get_space_runtime(repo_id=repo_id)21 unmodified linesresponse = await client.post(transcribation_url, files=files, data=data, headers=headers)if response.status_code == 200:logging.info("Video successfully sent for transcription")else:logging.error(f"Error sending video for transcription: {response.text}")181 unmodified lines18218318418518618718818919019121 unmodified lines213214215216217218219181 unmodified linessemaphore = asyncio.Semaphore(1)async def send_video_for_transcription(file: UploadFile, hash_path: str):async with semaphore:try:logging.info(f"Background task: sending video {file.filename} for transcription")run_time = api.get_space_runtime(repo_id=repo_id)21 unmodified linesresponse = await client.post(transcribation_url, files=files, data=data, headers=headers)if response.status_code == 200:logging.info(f"Video successfully sent for transcription {file.filename}")else:logging.error(f"Error sending video for transcription: {response.text}")
main.py+3-3