Sudipta Nayak
commited on
Commit
·
0499cdb
1
Parent(s):
9597066
file path changed
Browse files- app/main.py +8 -5
app/main.py
CHANGED
@@ -52,16 +52,19 @@ async def detect_objects(request: Request, file: UploadFile):
|
|
52 |
|
53 |
print('Detect end')
|
54 |
|
55 |
-
original_image_path = str(input_file_path)
|
56 |
-
output_image_path = f"{output_file_path}/exp/{file.filename}"
|
|
|
|
|
|
|
57 |
|
58 |
-
print('original_image path :', original_image_path)
|
59 |
-
print('output_image_path path :', output_image_path)
|
60 |
|
61 |
# Render HTML using Jinja2Templates
|
62 |
return templates.TemplateResponse(
|
63 |
"result.html",
|
64 |
-
{"request": request, "original_image":
|
65 |
)
|
66 |
# return StreamingResponse(open(output_file, "rb"), media_type="video/mp4")
|
67 |
|
|
|
52 |
|
53 |
print('Detect end')
|
54 |
|
55 |
+
# original_image_path = str(input_file_path)
|
56 |
+
# output_image_path = f"{output_file_path}/exp/{file.filename}"
|
57 |
+
|
58 |
+
original_image_path = f"../static/{file.filename}"
|
59 |
+
output_image_path = f"../static/output/{file.filename}"
|
60 |
|
61 |
+
print('original_image path :', str(original_image_path))
|
62 |
+
print('output_image_path path :', str(output_image_path))
|
63 |
|
64 |
# Render HTML using Jinja2Templates
|
65 |
return templates.TemplateResponse(
|
66 |
"result.html",
|
67 |
+
{"request": request, "original_image": str(original_image_path), "output_image": str(output_image_path)}
|
68 |
)
|
69 |
# return StreamingResponse(open(output_file, "rb"), media_type="video/mp4")
|
70 |
|