Skip to content

BayMax is a machine learning web app that predicts the disease based on user symptoms.

Notifications You must be signed in to change notification settings

Dikshant09/Baymax

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 

Repository files navigation

BayMax

  • It’s a web app that can predict the disease based on user symptoms.
  • The data we’re using is taken from the Kaggle.
  • Python & its libraries such as Pandas, Numpy, Matplotlib & Sklearn is used for model creation.
  • React is used as Frontend and Sass is used for Styling.
  • Google Firebase & Firestore is used as Backend.
  • Google OAuth is used for authentication purposes

Live Link: BayMax

Requirements

  • Node v10+
  • Configured firebase.config.js file
  • Google Account

ML Model API

Model is deployed on Hugging spaces using Gradio.

POST Request

Input Payload

{
  "data": [
     string, // represents symptoms
   ]
}

Response Object

{
  "data": [
    string, // represents predictions
  ],
  "duration": (float) // number of seconds to run function call
}

How to run

  1. Create firebase.config.js file in client/src/

    Create a Firebase App using google account and then you will get below drive code & some API keys.
    Ensure the API keys are configured in .env in this directory. It should include the following keys:

import { getFirestore } from 'firebase/firestore';
import { initializeApp } from "firebase/app";

const firebaseConfig = {
  apiKey: "XXXXXXXXXXXXXXX",
  authDomain: "XXXXXXXXXXXXXXX",
  projectId: "XXXXXXXXXXXXXXX",
  storageBucket: "XXXXXXXXXXXXXXX",
  messagingSenderId: "XXXXXXXXXXXXXXX",
  appId: "XXXXXXXXXXXXXXX",
  measurementId: "XXXXXXXXXXXXXXX"
};

// Initialize Firebase
const app = initializeApp(firebaseConfig);
export const db = getFirestore();
  1. Create .env file in client/

    If you want to use another disease prediction API, replace the below key with that one.

REACT_APP_BACKEND_API  =  'https://dikshant09-disease-prediction-api.hf.space/run/predict'
  1. Install dependencies and start the localhost server.
npm install
npm run start