Giter Site home page Giter Site logo

mehdimo / car-price-prediction Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 87.52 MB

A simple end-to-end ML model application using Falsk, Angular, and docker to predict car price

TypeScript 0.01% HTML 0.01% Sass 0.01% Python 95.11% Jupyter Notebook 0.10% PowerShell 0.01% Shell 0.01% C 1.09% Cython 3.39% C++ 0.13% Meson 0.01% Fortran 0.11% Forth 0.01% Smarty 0.01% JavaScript 0.02% CSS 0.01% Dockerfile 0.01%
angular docker docker-compose end-to-end flask learning-by-doing simple-app simple-project machine-learning ml-project nginx

car-price-prediction's Introduction

Car Price Prediction App

This is a simple app to show how to create a complete solution that uses a machine learning model for prediction.

Screenshot image

Project Structure

root
 +-data: contains the training data.
 |
 +-frontend: frontend application by Angular
 |
 +-model: backend predictor model in python and Flask API.
 

How to Run

Use docker-compose

Note: Make sure you have Docker installed.

  • Go in to frontend/src/assets/config.json and change the backendHost to the hosting machine.
  • In the root of the project, run docker-compose up
  • The two containers will run and your app will be available on the Host IP (port 80).

Use Docker

Both frontend and backend applications come with their own Docker file.

  1. Run the model (python):

    • change directory to model/
    • Run docker built -t backend .
    • Run docker run -p 8081:8081 backend
    • The backend app will be running on http://localhost:8081.
  2. Run the frontend (angular):

    • change directory to frontend
    • Run docker build -t frontend .
    • Run docker run --rm --name car_price_front_app -p 80:80 frontend
    • The frontend will be running on http://localhost:80.
      • --rm will remove the container after it terminates.
      • --name assigns a name to the container.

Manual

  1. Backend
  • Navigate to the model/ folder: cd model
  • Create virtual env.
    • python -m venv venv
    • source venv/bin/activate
  • pip install -r requirements.txt
  • cd app
  • python app.py
  1. Frontend
  • Note: Make sure you have Node version 20 (or higher).
  • Navigate to frontend/ folder: cd frontend
  • Install dependencies: npm install
  • ng serve to run your Angular application during development.
    • It's not recommended to use it in production.

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.