Update main.py
Browse files124 unmodified lines1251261271281291301319 unmodified lines141142143144145146147124 unmodified linesif run_time.stage != 'RUNNING':await restart_and_check_space(repo_id)else:logger.info('Transcribation space is running, sending file')async with httpx.AsyncClient() as client:user_id = responseRetrieve.get('metadata', {}).get('user_id', None)event_id = responseRetrieve.get('metadata', {}).get('event_id', None)9 unmodified linesheaders = {'Authorization': f'Bearer {os.environ.get("HF_TOKEN")}'}response = await client.post(transcribation_url, headers=headers, data=data)logger.info(f"Status code: {response.status_code}, Data: {response.text}")124 unmodified lines1251261271281291301319 unmodified lines141142143144145146147148149124 unmodified linesif run_time.stage != 'RUNNING':await restart_and_check_space(repo_id)else:logger.info('Transcribation space is running, sending file ')async with httpx.AsyncClient() as client:user_id = responseRetrieve.get('metadata', {}).get('user_id', None)event_id = responseRetrieve.get('metadata', {}).get('event_id', None)9 unmodified linesheaders = {'Authorization': f'Bearer {os.environ.get("HF_TOKEN")}'}logger.info(f'Video URL: {str(responseRetrieve.get('video_url')} ')response = await client.post(transcribation_url, headers=headers, data=data)logger.info(f"Status code: {response.status_code}, Data: {response.text}")
main.py+4-2