Spaces:
Sleeping
Sleeping
|
Download README.md from Hoanha2101/FPTCheckInFastAPI: direct link, hf CLI and curl.
- Browser
- Download file 2.15 kB
-
https://huggingface.co/spaces/Hoanha2101/FPTCheckInFastAPI/resolve/main/README.md
- Command line
-
hf download hf://spaces/Hoanha2101/FPTCheckInFastAPI/README.md
-
curl -L -o README.md https://huggingface.co/spaces/Hoanha2101/FPTCheckInFastAPI/resolve/main/README.md
2.15 kB
| 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 | |
| ``` |