YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

Medical Chatbot App

This Medical Chatbot is designed for personal use and is built with Django on the backend and Vite.js on the frontend. It supports two AI modes: GeminiAI mode and OpenAI mode, allowing users to switch seamlessly between these two chatbot functionalities.

The project utilizes the Django Rest Framework (DRF) for API endpoints and Django Channels for handling WebSocket connections, providing a real-time chat experience.

Introduction

This Medical Chatbot Assistant aims to provide users with quick, accurate, and reliable medical information through an interactive chat interface. Whether you need answers to common medical queries or want to understand symptoms better, this assistant leverages advanced AI technology to assist you in making informed decisions about your health.

Key Functionalities

  • Real-time Chat: Interact with the chatbot in real-time for immediate responses.
  • AI Modes: Switch between GeminiAI and OpenAI for varied responses based on your preference.
  • Symptom Checker: Input symptoms to receive potential explanations and suggestions for further action.
  • Medication Information: Get information about various medications, including uses, side effects, and precautions.
  • Health Tips: Access a wealth of health and wellness tips to promote a healthier lifestyle.
  • User-Friendly Interface: A clean and intuitive chat interface for seamless interactions.

Key Technologies

  • Backend: Django, Django Rest Framework, Django Channels
  • Frontend: Vite.js
  • WebSockets: Real-time communication via Django Channels
  • AI Modes: GeminiAI and OpenAI
  • Environment Management: Conda & Pip
  • Containerization: Docker (planned for deployment)

Setup Instructions

To get started with this project, follow the steps below.

Prerequisites

  • Install Conda to manage the environment. If you don't have Conda installed, follow the instructions here to set it up.

How to Download the Repository

You can download or clone this repository using the following command:

git lfs install #installs lfs if not initialize earlier
git lfs clone https://huggingface.co/Vinay2701/Medical_Chat_App

Step 1: Create Conda Environment

Once Conda is installed, you can easily create the environment using the provided environment.yml file. Run the following command in your terminal:

conda env create -f environment.yml

Step 2: Activate Environment

After the environment is created, activate it using the command:

conda activate DTX_chat

Step 3: Add Environment Variables

Introduction to Tembo.io

For this project, we are utilizing the managed PostgreSQL database provided by Tembo.io. It's designed to help developers build, scale, and maintain Postgres databases effortlessly.

Setup Instructions

Before running the application, ensure that you have the necessary credentials for connecting to your Tembo.io PostgreSQL database. These credentials can be added to your environment variables or configuration files.

Obtaining API Keys

Google API Key

To obtain a Google API key, visit the Google Cloud Platform and create a project. Enable the necessary APIs and generate an API key for your application. Refer to the official Google Cloud documentation for more details.

OpenAI API Key

To get an OpenAI API key, sign up at the OpenAI website and navigate to the API section of your account. There, you can create and manage your API keys. Visit the OpenAI documentation for further information. """

Create a .env file in the root directory of the project and add the following environment variables:

GOOGLE_API_KEY=
TEMBO_HOST= ## your host name
TEMBO_PASSWORD= #Tembo Password
OPENAI_API_KEY=

Make sure to replace these placeholder values with your actual API keys and credentials.

Step 4: Start the Project

Once the environment is set up and the necessary variables are added, you can start the project by running:

if you are running this project for first time then you need to setup necessary tables on the postgres to start using chat interface in that case you have to run,

If I have shared credentials with you do not run this file

python connection_setup.py

if you run connection_Setup again, it will reset your database and start from fresh. Since this is not a production-level project, I like to keep it simple like this.

Once everything is setup, stay in the project home directory and run the project:

python run_server.py

This command will launch both the backend server and the frontend server.

Note : I tried to make run_Server.py as robust as possible , If you are running through some errors , you might have to run both servers manually to launch the app

  1. open two terminals and navigate to the parent directory
  2. enable conda environment in both directories
  3. run python manage.py in one, this should start djang server , ideally with out any errors
  4. navigate to frontend folder on the other terminal
  5. run npm install and npm run dev
  6. this should start the chatbot on the frontend

Step 5: Access the Chat Interface

To access the frontend, open your browser and navigate to:

http://localhost:5173

You should see the chat interface where you can start interacting with the bot.

Switching AI Modes

You can easily switch between GeminiAI and OpenAI modes by using the switch button located at the top-right corner of the chat interface.


Future Plans

I am planning to implement Docker for containerization and deployment on Hugging Face, making the app easily deployable across different environments.


Feel free to contribute or provide feedback to improve this project!

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support