Code Monkey home page Code Monkey logo

bharadwajrathod / drug-recommendation-system-based-on-the-condition-of-the-patient-using-bert Goto Github PK

View Code? Open in Web Editor NEW

This project forked from asha-gutlapalli/drug-recommendation-system-based-on-the-condition-of-the-patient-using-bert

0.0 0.0 0.0 12.95 MB

Patients are recommended drugs based on their condition and reviews of the drugs from other patients. They can submit their own review of the drug as well that would help future patients.

License: MIT License

Python 24.74% Jupyter Notebook 75.26%

drug-recommendation-system-based-on-the-condition-of-the-patient-using-bert's Introduction

Drug Recommendation System based on the Condition of the Patient using Bidirectional Encoder Representations from Transformers

Patients are recommended drugs based on their condition and reviews of the drugs from other patients. They can submit their own review of the drug as well that would help future patients. A BERT model fine-tuned on text classification was employed for this objective where it identifies whether the reviewer recommends or does not recommend a particular medicine.

BERT

BERT is the Bidirectional Encoder Representations from Transformers developed by Google. It is a attention mechanism that unlike a regular transformer consists only of an encoder network. It learns the correlation between words by ingesting the entire sequence of tokens at once. BERT is pre-trained on two NLP tasks namely Masked Langauge Modelling (MLM) and Next Sentence Prediction (NSP). In simple words, MLM facilitates BERT to understand the relationship between words while NSP facilitates BERT to understand the relationship between sentences. BERT can be used to finetune on a wide range of NLP applications such as classification, Question Answering, and Named Entity Recognition to name a few.

Install Packages

Install required libraries using the following command:

$ pip install -r requirements.txt

Files

  • /notebooks: Notebooks on BERT and MongoDB
  • /assets: All images and GIFs displayed on this README.md
  • utils.py: Consists of helper functions for MongoDB and Streamlit
  • model.py: BERT model
  • run.py: Streamlit app

Train, Evaluate, and Test

Check out the notebook BERT.ipynb to train, evaluate, and test your own model on custom datasets.

MongoDB

Follow the steps below to set up your own collection using MongoDB:

Connect MongoDB to Streamlit

Read this tutorial to connect MongoDB to Streamlit.

Run Streamlit App

Use the following command to run Streamlit App:

$ streamlit run run.py

  You can now view your Streamlit app in your browser.

  Local URL: http://localhost:8501
  Network URL: http://192.168.1.4:8501

Check out the GIFs below for demonstrations!

Home

Patient Reviews

Submit Feedback

drug-recommendation-system-based-on-the-condition-of-the-patient-using-bert's People

Contributors

asha-gutlapalli 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.