Sudipta Nayak
commited on
Commit
·
5b920f8
1
Parent(s):
335c0e5
delay code added
Browse files- app/main.py +4 -0
app/main.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
import os
|
|
|
2 |
from fastapi import FastAPI, Request, UploadFile, HTTPException
|
3 |
from fastapi.responses import HTMLResponse, FileResponse
|
4 |
from fastapi.staticfiles import StaticFiles
|
@@ -58,6 +59,9 @@ async def detect_objects(request: Request, file: UploadFile):
|
|
58 |
print('output_image_path :', str(output_image_path))
|
59 |
print('is_video :', str(is_video))
|
60 |
|
|
|
|
|
|
|
61 |
# Render HTML using Jinja2Templates
|
62 |
return templates.TemplateResponse(
|
63 |
"result.html",
|
|
|
1 |
import os
|
2 |
+
import time
|
3 |
from fastapi import FastAPI, Request, UploadFile, HTTPException
|
4 |
from fastapi.responses import HTMLResponse, FileResponse
|
5 |
from fastapi.staticfiles import StaticFiles
|
|
|
59 |
print('output_image_path :', str(output_image_path))
|
60 |
print('is_video :', str(is_video))
|
61 |
|
62 |
+
if(str(is_video).lower() == "true"):
|
63 |
+
time.sleep(15)
|
64 |
+
|
65 |
# Render HTML using Jinja2Templates
|
66 |
return templates.TemplateResponse(
|
67 |
"result.html",
|