Sudipta Nayak
commited on
Commit
·
81536c9
1
Parent(s):
8d06a6e
no message
Browse files- app/main.py +1 -1
- app/templates/index.html +1 -1
app/main.py
CHANGED
@@ -29,7 +29,7 @@ async def root(request: Request):
|
|
29 |
return templates.TemplateResponse("index.html", {"request": request})
|
30 |
|
31 |
|
32 |
-
@app.post("/detect
|
33 |
async def detect_objects(request: Request, item: Item):
|
34 |
try:
|
35 |
print('Item:', item)
|
|
|
29 |
return templates.TemplateResponse("index.html", {"request": request})
|
30 |
|
31 |
|
32 |
+
@app.post("/detect/", response_class=HTMLResponse)
|
33 |
async def detect_objects(request: Request, item: Item):
|
34 |
try:
|
35 |
print('Item:', item)
|
app/templates/index.html
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
</head>
|
9 |
<body>
|
10 |
<h1>Welcome to Object Detection App</h1>
|
11 |
-
<form action="/detect
|
12 |
<label for="file">Upload an Image or Video :</label>
|
13 |
<input type="file" id="file" name="file" accept=".jpg, .jpeg, .png, .mp4" required>
|
14 |
<button type="submit">Detect Objects</button>
|
|
|
8 |
</head>
|
9 |
<body>
|
10 |
<h1>Welcome to Object Detection App</h1>
|
11 |
+
<form action="/detect/" method="post" enctype="multipart/form-data">
|
12 |
<label for="file">Upload an Image or Video :</label>
|
13 |
<input type="file" id="file" name="file" accept=".jpg, .jpeg, .png, .mp4" required>
|
14 |
<button type="submit">Detect Objects</button>
|