Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -629,9 +629,12 @@ async def genvideo(request: Request, prompt: str = None):
|
|
| 629 |
check_rate_limit(client_ip)
|
| 630 |
|
| 631 |
if prompt is None:
|
|
|
|
|
|
|
| 632 |
body = await request.json()
|
| 633 |
prompt = body.get("prompt")
|
| 634 |
-
|
|
|
|
| 635 |
if not prompt:
|
| 636 |
raise HTTPException(400, "Prompt is required")
|
| 637 |
|
|
|
|
| 629 |
check_rate_limit(client_ip)
|
| 630 |
|
| 631 |
if prompt is None:
|
| 632 |
+
return RedirectResponse(url="/gen/video/airforce", status_code=status.HTTP_307_TEMPORARY_REDIRECT)
|
| 633 |
+
|
| 634 |
body = await request.json()
|
| 635 |
prompt = body.get("prompt")
|
| 636 |
+
else:
|
| 637 |
+
return RedirectResponse(url=f"/gen/video/airforce/{prompt}", status_code=status.HTTP_307_TEMPORARY_REDIRECT)
|
| 638 |
if not prompt:
|
| 639 |
raise HTTPException(400, "Prompt is required")
|
| 640 |
|