mirror of
https://github.com/StefBuwalda/ProjectIOT.git
synced 2025-10-29 18:59:57 +00:00
Cleanup and added readme
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,3 +1,6 @@
|
||||
# Manually added
|
||||
migrations
|
||||
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
|
||||
77
README.md
77
README.md
@@ -1 +1,76 @@
|
||||
# ProjectIOT
|
||||
|
||||
# Installation Guide
|
||||
|
||||
## Setting Up Your Virtual Environment
|
||||
|
||||
### 1. Create a Virtual Environment
|
||||
To begin, create a virtual environment using the following command IN A NEW TERMINAL:
|
||||
```bash
|
||||
python -m venv .venv
|
||||
```
|
||||
|
||||
### 2. Activate the Virtual Environment
|
||||
For Windows, activate the virtual environment with IN A NEW TERMINAL:
|
||||
```bash
|
||||
.\.venv\Scripts\activate.bat
|
||||
```
|
||||
|
||||
### 3. Install Required Packages
|
||||
Once the environment is activated, install the necessary packages by running:
|
||||
```bash
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
### 4. Update outdated Packaged
|
||||
To avoid errors the ultralytics packages needs to be manually updated:
|
||||
```bash
|
||||
pip install -U ultralytics
|
||||
---
|
||||
|
||||
## Setting Up the Database
|
||||
|
||||
### 1. Initialize the Database
|
||||
To initialize the database, run the following command:
|
||||
```bash
|
||||
flask --app app.py db init
|
||||
```
|
||||
|
||||
### 2. Migrate the Database
|
||||
Migrate the database schema to the latest version with:
|
||||
```bash
|
||||
flask --app app.py db migrate
|
||||
```
|
||||
|
||||
### 3. Upgrade the Database
|
||||
Apply the migration to update the database with:
|
||||
```bash
|
||||
flask --app app.py db upgrade
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Seeding the Database
|
||||
To populate the database with a few sample users and services, run:
|
||||
```bash
|
||||
python seed.py
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Starting the Application
|
||||
To start the application, run:
|
||||
```bash
|
||||
python app.py
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
# Development Commands
|
||||
|
||||
### Updating `requirements.txt`
|
||||
To update the `requirements.txt` with the currently installed packages, use the following command:
|
||||
```bash
|
||||
pip freeze > requirements.txt
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
@@ -1,13 +1,6 @@
|
||||
from ultralytics.nn.tasks import DetectionModel # type: ignore
|
||||
import torch
|
||||
from application import app
|
||||
from application.api.views import api_blueprint
|
||||
|
||||
|
||||
torch.serialization.add_safe_globals( # type: ignore
|
||||
{"DetectionModel": DetectionModel} # type: ignore
|
||||
)
|
||||
|
||||
app.register_blueprint(api_blueprint)
|
||||
|
||||
|
||||
@@ -5,18 +5,17 @@ certifi==2025.1.31
|
||||
charset-normalizer==3.4.1
|
||||
click==8.1.8
|
||||
colorama==0.4.6
|
||||
contourpy==1.3.1
|
||||
contourpy==1.3.2
|
||||
cv2filters==0.2.6
|
||||
cycler==0.12.1
|
||||
defusedxml==0.7.1
|
||||
filelock==3.18.0
|
||||
Flask==3.1.0
|
||||
Flask-Login==0.6.3
|
||||
Flask-Migrate==4.1.0
|
||||
Flask-SQLAlchemy==3.1.1
|
||||
fonttools==4.57.0
|
||||
fsspec==2025.3.2
|
||||
greenlet==3.1.1
|
||||
greenlet==3.2.1
|
||||
h5py==3.13.0
|
||||
huggingface-hub==0.30.2
|
||||
idna==3.10
|
||||
@@ -32,9 +31,9 @@ mpmath==1.3.0
|
||||
networkx==3.4.2
|
||||
numpy==1.26.4
|
||||
opencv-python==4.11.0.86
|
||||
packaging==24.2
|
||||
packaging==25.0
|
||||
pandas==2.2.3
|
||||
pillow==11.1.0
|
||||
pillow==11.2.1
|
||||
psutil==7.0.0
|
||||
py-cpuinfo==9.0.0
|
||||
pyclipper==1.3.0.post6
|
||||
@@ -49,18 +48,19 @@ RapidFuzz==3.13.0
|
||||
requests==2.32.3
|
||||
scipy==1.15.2
|
||||
seaborn==0.13.2
|
||||
setuptools==78.1.0
|
||||
setuptools==79.0.1
|
||||
shapely==2.1.0
|
||||
six==1.17.0
|
||||
sql-migrate==0.1.0
|
||||
SQLAlchemy==2.0.40
|
||||
sympy==1.13.1
|
||||
torch==2.6.0
|
||||
torchvision==0.21.0
|
||||
sympy==1.13.3
|
||||
torch==2.7.0
|
||||
torchvision==0.22.0
|
||||
tqdm==4.67.1
|
||||
typing_extensions==4.13.2
|
||||
tzdata==2025.2
|
||||
ultralytics==8.3.106
|
||||
ultralytics==8.2.55
|
||||
ultralytics-thop==2.0.14
|
||||
urllib3==2.3.0
|
||||
urllib3==2.4.0
|
||||
Werkzeug==3.1.3
|
||||
win32_setctime==1.2.0
|
||||
|
||||
Reference in New Issue
Block a user