Skip to content

Commit

Permalink
Removed unwanted files
Browse files Browse the repository at this point in the history
  • Loading branch information
devansh-shah-11 committed Mar 5, 2024
1 parent 26188ab commit 0a31d03
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 8 deletions.
Binary file removed FACE-REC SYSTEM.pptx
Binary file not shown.
16 changes: 12 additions & 4 deletions FaceRec/app/main/Employee.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,26 @@ def submit_form():
"Name": Name,
"gender": gender,
"Department": Department,
"encoded_image": encoded_image,
"Image": encoded_image,
}
url = "http://127.0.0.1:8000/create_new_faceEntry"
try:
resp = requests.post(url=url, data=payload)
resp = requests.post(url=url, json={
"EmployeeCode": 134,
"Name": "Name",
"gender": "gender",
"Department": "Department",
"Image": "your_image",
})
resp.status_code
except requests.exceptions.RequestException as e:
print(f"Request failed: {e}")
jsonify({"message": "Successfully executed"})
print("Executed.")
return redirect("DisplayingEmployees")

if resp.status_code==200:
return redirect("DisplayingEmployees")
else:
return jsonify({"message": "Failed to execute"})

# To edit an employee details
@flk_blueprint.route("/edit/<int:EmployeeCode>", methods=["POST", "GET"])
Expand Down
2 changes: 1 addition & 1 deletion FaceRec/static/Images/image_data.json

Large diffs are not rendered by default.

Binary file removed Face_Rec Project proposal.pdf
Binary file not shown.
Binary file removed Face_Rec Project revised proposal.pdf
Binary file not shown.
46 changes: 43 additions & 3 deletions test.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 1,
"metadata": {},
"outputs": [
{
Expand All @@ -554,7 +554,7 @@
"{'message': 'Face entry created successfully'}"
]
},
"execution_count": 11,
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -623,6 +623,46 @@
"response = requests.post(url, json=data)\n",
"response.json()"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"url = \"http://127.0.0.1:8000/create_new_faceEntry\"\n",
"resp = requests.post(url=url, json={\n",
" \"EmployeeCode\": 134,\n",
" \"Name\": \"Name\",\n",
" \"gender\": \"gender\",\n",
" \"Department\": \"Department\",\n",
" \"Image\": \"your_image\",\n",
"})"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"<Response [500]>\n"
]
}
],
"source": [
"print(resp)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand All @@ -641,7 +681,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.8"
"version": "3.9.16"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 0a31d03

Please sign in to comment.