Skip to content

An interactive Python chatbot that helps users identify a possible diagnosis based on the symptoms they report.

Notifications You must be signed in to change notification settings

lesimoes/diagnosis-chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

title emoji colorFrom colorTo sdk sdk_version app_file pinned
Chatbot Mistral
😷
gray
indigo
streamlit
1.42.0
app.py
false

Symptom Diagnosis Chatbot

An interactive Python chatbot that helps users identify a possible diagnosis based on the symptoms they report. This project integrates a knowledge base stored in a database.txt file and utilizes HuggingFace models for generating responses and performing translations.

Description

This project was created to:

  • Load a Knowledge Base: A database.txt file contains symptoms and their corresponding content. Each record follows the format:

  • Generate Customized Responses: Using the Mistral-7B-Instruct-v0.3 model from HuggingFace to interpret the user's query and the Helsinki-NLP/opus-mt-tc-big-en-pt model to translate responses into Portuguese.

  • Provide an Interactive Web Interface: Built with Streamlit, allowing users to interact with the chatbot and adjust parameters via a sidebar.

Features

  • Knowledge Base Integration: Reads and formats symptoms and content from an external file.
  • Response Generation: Provides responses based on the conversation context and the knowledge base.
  • Automatic Translation: Translates responses to Portuguese.
  • Interactive Web Interface: Developed with Streamlit, enabling a simple and intuitive conversation with the chatbot.
  • Customizable Settings: Allows adjustments to system messages, maximum response length, and other parameters through the interface.

Prerequisites

  • Python 3.8 or higher
  • HuggingFace Access Token: Set the environment variable HF_TOKEN with your HuggingFace token.
  • The following Python libraries:
  • streamlit
  • transformers
  • langchain-huggingface
  • (Other dependencies may be listed in a requirements.txt file)

Installation

  1. Clone the Repository

  2. Install requirements

pip install -r requirements.txt

Highly recommend use hugginface spaces

About

An interactive Python chatbot that helps users identify a possible diagnosis based on the symptoms they report.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages