Giter Club home page Giter Club logo

glucoguardapp_ai-summativeproject's Introduction

Kezia In Leadership

Hii there

๐Ÿ‘ฉโ€๐Ÿ’ป About Me :

I am a Full Stack Developer

  • ๐Ÿ”ญA Computer Science Student

  • Curious about Computational biology ๐Ÿค– ๐Ÿงฌ ๐Ÿ•ต๏ธ.

  • ๐ŸŒฑ A Google Developers Student Club Lead, exploring Open Source platforms and Community Projects

  • โšก In my free time, I keep up with the latest technology updates #Blockchain #AI #ML

  • ๐Ÿ“– I love classic literature and play alto sax ๐ŸŽท

  • ๐Ÿ“ซHow to reach me: LinkedIn Badge

Top Langs

Let's Code

glucoguardapp_ai-summativeproject's People

Contributors

ivy-murage avatar wahomekezia avatar

Watchers

 avatar

glucoguardapp_ai-summativeproject's Issues

Website Building

We are still deciding what frameworks to use and how our UI will look like to make it easier for the users
We will use reactjs and Flask

Model Training

For model training, we are using Pima Indians Dataset we obtained from Kaggle

These are steps used in Model training

  • Exploratory Data Analysis (EDA)
  • Data Visualization
  • Correlation between all the features
  • Scaling the Data
  • Model Building
  • We have Random Forest algorithm
  • Saving Model โ€“ Random Forest as a pickle file

Find the google colab file here

Getting Started!

For this project , I am using a mac and configurations are a bit new to me ,

This are the steps I have taken to install and set up my development environments

  • Installing Xcode ,
    There was version conflicts when install Xcode from App store . So I used the Vscode terminal
    I used this command xcode-select --install

I was then able to clone my repo from github

  • Creating a ReactApp
    At this stage , the I run the command npx -create-react-app -glucoguard and got an error message zsh: command not found: npx
    To install npm and npx , i first install homebrew using this command bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    the systems checked for sudo access by asking for paswword , then installed homebrew

  • Adding Homebrew to my PATH
    After a successful installation , I got this warning message
    `Warning: /opt/homebrew/bin is not in your PATH.

    To add brew to my PATH , I run this in my command
    nano ~/.zprofile
    then added this
    eval "$(/opt/homebrew/bin/brew shellenv)"

    I still wasn't able to run brew commandson. my terminal

    I uninstalled homebrew /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
    and run this command sudo rm -rf /opt/homebrew/etc /opt/homebrew/share /opt/homebrew/var to remove the remaining homebrew files

    The message I had from the terminal
    The following possible Homebrew files were not deleted: /opt/homebrew/etc/ /opt/homebrew/share/ /opt/homebrew/var/ You may wish to remove them yourself.

    After second installation , I used this commands
    echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
    eval "$(/opt/homebrew/bin/brew shellenv)"

    To verify that Homebrew is installed and working correctly by I run the following command:
    brew doctor
    An everything was working .

I finally was able to run my npm commands
Also run npm install -g npx once npm is installed to install npx

creating a flask app

I have created a flask app which I later deploy on Azure App services to get the endpoint /predict

First was to config the flask

  • creates a folder called template
    Flask uses a templating engine called Jinja2 which requires that all HTML or template files be stored in a folder called "templates" in the same directory as your Flask app

since I am using jsx files , I needed to configure Flask to use that extension by adding the following line to flaskapp.py file:


app = Flask(__name__)
jsglue = JSGlue(app)

# Add the JSX extension to Flask's Jinja environment
app.jinja_env.add_extension('pyxl.jinja.PyXLExtension')
app.jinja_env.add_extension('pyxl_jinja.JSXExtension')

This line of code adds support for the PyXL templating language, which uses the ".pyx" file extension.
In the terminal I installpip install --upgrade jinja2

-When running the requirement.txt
This is the error I am getting

      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for numpy
  Building wheel for pandas (pyproject.toml) ... done
  Created wheel for pandas: filename=pandas-1.2.2-cp310-cp310-macosx_11_0_arm64.whl size=9124426 sha256=2fde57edca2ad375170f5b1dd3152a55d3fcf12fe10e4f1fbd7f42897a86ea80
  Stored in directory: /Users/keziawangeciwahome/Library/Caches/pip/wheels/3e/5e/23/95e1e24bfc72728eea4bc557c040684b7c1af623b37fdbf7be
  Building wheel for scikit-learn (pyproject.toml) ... done
  Created wheel for scikit-learn: filename=scikit_learn-0.24.1-cp310-cp310-macosx_12_0_arm64.whl size=6352154 sha256=242e1a12bb6f7602d3125fa5244ce73c5bf781561d50764760b5efb1b2390afa
  Stored in directory: /Users/keziawangeciwahome/Library/Caches/pip/wheels/7a/5d/32/f4299815f5e059746d9535998da45ed806ef87421d565c47d3
Successfully built pandas scikit-learn
Failed to build numpy
ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects

This is because I had installed numpy before pip show numpy

Also need to install pip install -U scikit-learn which is used to unpickle the model

to get ride of this error , I will deploy the model as an app , flaskapp instead of integrating it with the react app

Steps for deployment

We are deploying the app on Azure ,

  1. I will be deploying the flaskapp.py file as a app(backend) to get the /predict and /results endpoints
  2. I will deploy my react app too on cloud after adding the model endpoints

This two will be in the same resource group

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.