Skip to content

Commit 2e92a0d

Browse files
committed
Frontend demo
1 parent ca40c47 commit 2e92a0d

File tree

20 files changed

+242
-58
lines changed

20 files changed

+242
-58
lines changed

ml-api/app/api/resources/v1/object_detection/router.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
@router.post("/process")
2525
async def ml_process(
2626
*,
27-
current_user = Depends(token_helper.get_current_user),
27+
# current_user = Depends(token_helper.get_current_user),
2828
file: UploadFile = File(...),
2929
background_tasks: BackgroundTasks
3030
):
@@ -44,7 +44,7 @@ async def ml_process(
4444
def ml_status(
4545
*,
4646
task_id: str,
47-
current_user = Depends(token_helper.get_current_user),
47+
# current_user = Depends(token_helper.get_current_user),
4848
):
4949
data = redis.get(task_id)
5050
if data == None:

ml-celery/app/tasks.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ def object_detection_task(self, task_id: str, data: bytes):
9797
data['status']['detection_status'] = "SUCCESS"
9898
if len(det_new) > 0:
9999
data['detection_result'] = det_new
100+
data['status']['general_status'] = "SUCCESS"
100101
data_dump = json.dumps(data)
101102
redis.set(task_id, data_dump)
102103
except Exception as e:

ml-client/src/admin/auth.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default function isAuth(){
2626
console.log("refreshToken not expire yet!", expireFreshToken)
2727
axios({
2828
method: "post",
29-
url: BASE_URL + "account/login/refresh-token",
29+
url: BASE_URL + "/account/login/refresh-token",
3030
data: bodyFreshToken,
3131
headers: { "Content-Type": "multipart/form-data" },
3232
}).then(function (response) {
46.8 KB
Loading
140 KB
Binary file not shown.
4.05 KB
Loading
4.14 KB
Loading
36.6 KB
Loading
224 KB
Loading
3.42 KB
Loading

0 commit comments

Comments
 (0)