Skip to content

πŸ”¬ Flask API for the Neuro Gambling Scanner project – Predicts gambling addiction risk using machine learning and returns personalized interventions.

Notifications You must be signed in to change notification settings

M-Z-5474/flask_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

16 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 Neuro Gambling Scanner - Flask API

This repository contains a Flask-based REST API for predicting gambling risk levels using a pre-trained Support Vector Machine (SVM) model. It is part of the Neuro Gambling Scanner project, aimed at identifying potential gambling addiction risks based on user data.

πŸš€ Features

  • Accepts .xlsx (Excel) files with 11,680 features per record.
  • Predicts risk category using a trained SVM model.
  • Returns predictions in JSON format.
  • Cross-Origin Resource Sharing (CORS) enabled for easy integration with front-end/mobile apps.
  • Deployable via railway.com for production environments.

πŸ—‚οΈ Repository Structure

β”œβ”€β”€ app.py # Main Flask application code

β”œβ”€β”€ svm_model.pkl # Trained SVM model (11680 input features)

β”œβ”€β”€ requirements.txt # Required Python packages

β”œβ”€β”€ README.md

πŸ“‘ API Endpoints

βœ… GET /

Returns a welcome message.

Response: "Welcome to the SVM Model Prediction API!"

πŸ” POST /predict

Uploads an Excel file for prediction.

πŸ”Έ Request: Content-Type: multipart/form-data Field name: file Format: .xlsx Excel file with 11680 columns

🧠 About the Model

Model Type: Support Vector Machine (SVM) Input Features: 11680 (possibly fMRI behavioral signals) Output: Risk Category β†’

0 (Low),

1 (Medium),

2 (High)

Trained using Scikit-learn

Author

This repository was created and maintained by Muhammad Zain Mushtaq

About

πŸ”¬ Flask API for the Neuro Gambling Scanner project – Predicts gambling addiction risk using machine learning and returns personalized interventions.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages