Deep Learning · Keras/TensorFlow · Flask API · React Dashboard
This repository contains:
- a Flask backend that runs classification using a Keras/TensorFlow model
- a React frontend dashboard located in
dashboardpfe/
PFE_SITE/
│
├── app.py
├── model.py
├── requirements.txt
├── trained_model_weights.weights.h5
├── uploaded_file.csv
│
├── dashboardpfe/ # React frontend
│ ├── package.json
│ ├── package-lock.json
│ └── ...
│
└── Demo/ # README screenshots
├── dashboard.png
├── enter signal.png
└── prediction result.png
- Python 3.8+
- Node.js + npm
- Windows: PowerShell recommended
Go to the root folder of the project:
cd "C:\Users\USER\Desktop\pfe_site"Create and activate a virtual environment:
python -m venv .venv
.\.venv\Scripts\Activate.ps1If activation is blocked:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
.\.venv\Scripts\Activate.ps1Install dependencies:
pip install --upgrade pip
pip install -r .\requirements.txtNote: If you want CPU-only TensorFlow, install
tensorflow-cpuinstead oftensorflow.
Make sure trained_model_weights.weights.h5 is in the project root, then:
cd "C:\Users\USER\Desktop\pfe_site"
.\.venv\Scripts\Activate.ps1
python .\app.pyBackend default URL:
http://127.0.0.1:5000
Open a second PowerShell terminal:
cd "C:\Users\USER\Desktop\pfe_site\dashboardpfe"
npm install
npm startFrontend default URL:
http://localhost:3000
The frontend uses the proxy configured to reach:
http://localhost:5000
Uploads a CSV file via multipart/form-data (field name: file).
The backend saves it as uploaded_file.csv, runs prediction, then returns:
{ "result": <int>, "confidence": <float> }PowerShell curl example:
curl -X POST -F "file=@C:\path\to\your_file.csv" http://localhost:5000/upload

