Spaces:
Sleeping
Sleeping
File size: 2,147 Bytes
a18e662 c768f00 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | ---
title: FPTCheckInFastAPI
emoji: "📋"
colorFrom: "indigo"
colorTo: "pink"
sdk: docker
app_file: Dockerfile
pinned: false
---
# 🚀 FPT CheckIn Server
This project uses **FastAPI** to build a fast, easy-to-use, and scalable RESTful API.
---
## 🧠 System Requirements
- Python 3.7 or later
- pip to manage libraries
---
## 📦 Installation
1. **Clone the project:**
```bash
git clone https://github.com/Hoanha2101/Server_CheckInAppMobile.git
cd Server_CheckInAppMobile
```
2. **Create virtual environment (optional but recommended):**
```bash
# Create virtual environment
python -m venv venv
# Activate virtual environment
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate
```
3. **Install required libraries:**
```bash
pip install -r requirements.txt
```
If you don't have the requirements.txt file, you can install it directly:
```
pip install fastapi uvicorn
```
4. **🚀 Run the application**
Run the following command to start the FastAPI server in development mode (with automatic reload when code changes):
```
uvicorn main:app --reload
#hoặc
uvicorn main:app --host 0.0.0.0 --port 8000
```
Explanation:
+ main: is the name of the Python file, for example main.py
+ app: is the FastAPI() object in that file
+ --reload: automatically reload when code changes (for devs)
5. **🌐 Access API documentation**
After running successfully, access the browser:
Swagger UI (visual API testing interface):
```
http://127.0.0.1:8000/docs
```
Redoc (alternative documentation interface):
```
http://127.0.0.1:8000/redoc
```
# 📁 Configuration project architecture
```
📁
│ config.py
│ connectDatabase.py
│ faceDetect.py
│ FaceNet.py
│ main.py
│ README.md
│ requirements.txt
│
├───images
│ check_image.jpg
│ faceArea.jpg
│
├───sql
│ CreateData.sql
│
├───weights
│ data.pickle
│ yolov8n-face.pt
│
└───__pycache__
config.cpython-39.pyc
connectDatabase.cpython-39.pyc
faceDetect.cpython-39.pyc
FaceNet.cpython-39.pyc
main.cpython-39.pyc
``` |