Update main.py
Browse files
main.py
CHANGED
|
@@ -125,7 +125,7 @@ async def send_webhook_for_transcription(payload: dict):
|
|
| 125 |
if run_time.stage != 'RUNNING':
|
| 126 |
await restart_and_check_space(repo_id)
|
| 127 |
else:
|
| 128 |
-
logger.info('Transcribation space is running, sending file')
|
| 129 |
async with httpx.AsyncClient() as client:
|
| 130 |
user_id = responseRetrieve.get('metadata', {}).get('user_id', None)
|
| 131 |
event_id = responseRetrieve.get('metadata', {}).get('event_id', None)
|
|
@@ -141,7 +141,9 @@ async def send_webhook_for_transcription(payload: dict):
|
|
| 141 |
headers = {
|
| 142 |
'Authorization': f'Bearer {os.environ.get("HF_TOKEN")}'
|
| 143 |
}
|
| 144 |
-
|
|
|
|
|
|
|
| 145 |
response = await client.post(transcribation_url, headers=headers, data=data)
|
| 146 |
|
| 147 |
logger.info(f"Status code: {response.status_code}, Data: {response.text}")
|
|
|
|
| 125 |
if run_time.stage != 'RUNNING':
|
| 126 |
await restart_and_check_space(repo_id)
|
| 127 |
else:
|
| 128 |
+
logger.info('Transcribation space is running, sending file ')
|
| 129 |
async with httpx.AsyncClient() as client:
|
| 130 |
user_id = responseRetrieve.get('metadata', {}).get('user_id', None)
|
| 131 |
event_id = responseRetrieve.get('metadata', {}).get('event_id', None)
|
|
|
|
| 141 |
headers = {
|
| 142 |
'Authorization': f'Bearer {os.environ.get("HF_TOKEN")}'
|
| 143 |
}
|
| 144 |
+
|
| 145 |
+
logger.info(f'Video URL: {str(responseRetrieve.get('video_url')} ')
|
| 146 |
+
|
| 147 |
response = await client.post(transcribation_url, headers=headers, data=data)
|
| 148 |
|
| 149 |
logger.info(f"Status code: {response.status_code}, Data: {response.text}")
|