Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -39,7 +39,7 @@ def process_video(video_url):
|
|
| 39 |
yield f"✅ Job submitted!\nID: {job_id}\nStatus: {status}\n\n🔄 Starting status polling..."
|
| 40 |
|
| 41 |
# Poll for status updates
|
| 42 |
-
max_attempts =
|
| 43 |
for attempt in range(max_attempts):
|
| 44 |
time.sleep(5) # Wait 5 seconds between checks
|
| 45 |
|
|
@@ -48,7 +48,7 @@ def process_video(video_url):
|
|
| 48 |
status_response = requests.get(status_url, headers=headers)
|
| 49 |
|
| 50 |
if status_response.status_code != 200:
|
| 51 |
-
yield f"❌ Status check failed (
|
| 52 |
continue
|
| 53 |
|
| 54 |
status_data = status_response.json()
|
|
|
|
| 39 |
yield f"✅ Job submitted!\nID: {job_id}\nStatus: {status}\n\n🔄 Starting status polling..."
|
| 40 |
|
| 41 |
# Poll for status updates
|
| 42 |
+
max_attempts = 200 # Increased for longer processing times
|
| 43 |
for attempt in range(max_attempts):
|
| 44 |
time.sleep(5) # Wait 5 seconds between checks
|
| 45 |
|
|
|
|
| 48 |
status_response = requests.get(status_url, headers=headers)
|
| 49 |
|
| 50 |
if status_response.status_code != 200:
|
| 51 |
+
yield f"❌ Status check failed (Ping {attempt+1}): HTTP {status_response.status_code}"
|
| 52 |
continue
|
| 53 |
|
| 54 |
status_data = status_response.json()
|