Coder Social home page Coder Social logo

device-price-prediction's Introduction

This project comprises two main components:

1 . ml-service

This part includes an Exploratory Data Analysis (EDA) and training notebook. It trains the model on the mobile devices saves the trained model to disk Additionally, it also the trained model via a Flask endpoint.

2. web-service

The web-service is built on Spring Boot framework. It implements a simple model and a controller to manage devices, utilizing an in-memory H2 database to store device data. The backend provides the following endpoints:

  • POST /api/devices/: Retrieves a list of all devices.
  • GET /api/devices/{id}: Retrieves details of a specific device by ID.
  • POST /api/devices: Adds a new device and saves it to the in-memory H2 database.
  • POST /api/predict/{deviceId}: Endpoint for making predictions based on a device ID.

Additionally, a testing.py script is included to test all functionalities using data from CSV files.

How to Run the Project

# Install ml-service dependencies:
pip install -r ml-service/requirements.txt

# Start ml-service:
python3 ml-service/deployment.py

# Build web-service:
# this assumes open-jdk-21 is installed and JAVA_HOME  env variable is set correctly 
./web-service/mvnw -f web-service/pom.xml clean package

# Start web-service:
./web-service/mvnw -f web-service/pom.xml spring-boot:run

# Run validation tests:
python3 testing.py

Possible Improvements:

  • Improve error handling in both services
  • Robust input validation when recieving requests

device-price-prediction's People

Contributors

ahmedo42 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.