From 50f3d19bb5e179d01ada8efac9186eeb848933d7 Mon Sep 17 00:00:00 2001 From: Tejasri Date: Thu, 11 Sep 2025 17:15:49 +0530 Subject: [PATCH 1/2] project_structure and improvements --- Build/temp | 1 - CONTRIBUTING.md | 155 ++++++++++-------- README.md | 78 +++++---- .../app/utils/nlp_utils.py | 0 .../from typing import List, Tuple.txt | 0 .../text_files/from typing import List.txt | 0 .../from typing import Optional.txt | 0 .../app/utils/text_files/import os.txt | 0 .../app/utils/text_files/import pytest.txt | 0 .../text_files/import streamlit as st.txt | 0 10 files changed, 121 insertions(+), 113 deletions(-) delete mode 100644 Build/temp rename from typing import Optional, List, Tuple.py => backend/app/utils/nlp_utils.py (100%) rename from typing import List, Tuple.txt => backend/app/utils/text_files/from typing import List, Tuple.txt (100%) rename from typing import List.txt => backend/app/utils/text_files/from typing import List.txt (100%) rename from typing import Optional.txt => backend/app/utils/text_files/from typing import Optional.txt (100%) rename import os.txt => backend/app/utils/text_files/import os.txt (100%) rename import pytest.txt => backend/app/utils/text_files/import pytest.txt (100%) rename import streamlit as st.txt => backend/app/utils/text_files/import streamlit as st.txt (100%) diff --git a/Build/temp b/Build/temp deleted file mode 100644 index 78981922..00000000 --- a/Build/temp +++ /dev/null @@ -1 +0,0 @@ -a diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0cd3387e..73a422e7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,90 +1,103 @@ -Here’s a set of **Contribution Guidelines** tailored for your open-source project: +# Contributing to AI-health-chatbot ---- +Thank you for considering contributing to AI-health-chatbot! πŸŽ‰ +We welcome contributions of all types β€” bug fixes, feature implementations, documentation improvements, and feedback. -# Contribution Guidelines +-> These guidelines are here to make the process smooth and collaborative for everyone. -Thank you for considering contributing to **Blok**! We welcome contributions of all types, including bug fixes, feature implementations, documentation improvements, and feedback. These guidelines are here to make the process clear and smooth for everyone. +## πŸš€ How to Contribute ---- +### 1. Discuss Your Idea -## How to Contribute +* Before starting work on a major change, please open an **issue** in the repository. +* Use the issue template (if available) or describe your idea clearly. -### 1. **Discuss Your Idea** -- Before starting work on a major change, please open an issue in the repository. -- Use the **#ideas-and-feedback** channel in our [Discord community](https://discord.gg/QXhHzw7azs) for discussions. +### 2. Fork and Clone -### 2. **Fork and Clone** -- Fork the repository to your GitHub account. -- Clone the forked repository to your local machine. +* Fork this repository to your GitHub account. +* Clone the forked repository to your local machine: ```bash -git clone https://github.com/YOUR_USERNAME/blok.git -cd blok +git clone https://github.com/CharithaReddy18/AI-health-chatbot.git +cd AI-health-chatbot ``` -### 3. **Set Up Your Environment** -- Follow the instructions in the `README.md` to set up your development environment. -- Run tests to ensure everything works as expected. - -### 4. **Work on Your Contribution** -- Create a new branch for your work: - ```bash - git checkout -b feature/your-feature-name - ``` -- Follow the coding style and conventions used in the project. -- Write clear, concise, and well-documented code. -- If adding a new feature, include relevant tests. - -### 5. **Commit Your Changes** -- Write meaningful commit messages: - ```bash - git commit -m "Add: Feature description" - ``` -- Push your changes to your fork: - ```bash - git push origin feature/your-feature-name - ``` - -### 6. **Submit a Pull Request** -- Open a pull request from your branch to the `main` branch of the original repository. -- Use the pull request template (if available) to provide details about your changes. -- Ensure that all automated tests pass before submission. - ---- - -## Code Style and Standards -- Use ESLint to ensure code consistency. -- Adhere to the project's architectural patterns and modular design principles. -- Avoid introducing unnecessary dependencies. - ---- - -## Reporting Issues -If you encounter a bug or have a feature request: -1. Check the Issues to ensure it hasn’t been reported. +### 3. Set Up Your Environment + +* Check the ['README.md'](README.md) for setup instructions. +* Install requirements based on requirements.txt. + +### 4. Work on Your Contribution + +* Create a new branch for your work: + +```bash +git checkout -b feature/your-feature-name +``` + +* Follow the coding style and conventions used in the project. +* Write clear, well-documented code. +* Add tests if applicable. + +### 5. Commit Your Changes + +* Use meaningful commit messages: + +```bash +git commit -m "Add: Short description of your change" +``` + +* Push your changes: + +```bash +git push origin feature/your-feature-name +``` + +### 6. Submit a Pull Request + +* Open a Pull Request (PR) to the `main` branch of this repository. +* Fill out the PR template (if available). +* Make sure all checks/tests pass before requesting review. + + +## 🧩 Code Style and Standards + +* Use ESLint / Prettier (if configured) for consistent formatting. +* Follow naming conventions and keep code modular. +* Avoid introducing unnecessary requirements. + + +## πŸ› Reporting Issues + +If you find a bug or have a feature request: + +1. Check the existing issues first. 2. Open a new issue with: - - A clear and descriptive title. - - Steps to reproduce the issue (if applicable). - - Expected and actual behavior. ---- + * A clear and descriptive title + * Steps to reproduce (if it’s a bug) + * Expected vs. actual behavior + + +## πŸ“– Documentation Contributions + +* Update relevant Markdown files (`README.md`, `docs/`) for docs-related changes. +* Keep writing clear, concise, and beginner-friendly. + + +## 🀝 Community and Conduct + +* Be respectful and collaborative in all interactions. +* Follow the project’s [Code of Conduct](CODE_OF_CONDUCT.md). + -## Documentation Contributions -- For documentation edits, update the relevant markdown files in the `docs/` directory. -- Follow a clear and concise writing style. +## ❓ Need Help? ---- +If you have any questions: -## Community and Conduct -- Be respectful and collaborative when interacting with others. -- Adhere to the project's [Code of Conduct](CODE_OF_CONDUCT.md). +* Open an issue with the `question` label. +* Tag project maintainers for clarification. ---- -## Need Help? -If you have questions or need help, feel free to: -- Join our [Discord community](https://discord.gg/QXhHzw7azs). -- Open an issue with the `question` label. +We’re excited to collaborate with you and improve **AI-health-chatbot** together! πŸ’‘ -We’re excited to collaborate with you and improve **Blok** together! diff --git a/README.md b/README.md index cf6ae3ae..1ead242b 100644 --- a/README.md +++ b/README.md @@ -137,44 +137,43 @@ It uses **rule-based logic** and a **RAG** (Retrieval-Augmented Generation) pipe

πŸ“‚ Project Structure

```plaintext -AI-health-chatbot/ -β”‚ .gitignore -β”‚ app.py # Main Streamlit application -β”‚ chat_history_2025...txt # Stored user chat history -β”‚ CODE_OF_CONDUCT.md # Contribution guidelines for behavior -β”‚ CONTRIBUTING.md # Steps for contributing to the project -β”‚ LICENSE # MIT License -β”‚ medical_agent.py # AI agent logic for health queries -β”‚ README.md # Project documentation -β”‚ requirements.txt # Python dependencies -β”‚ ROADMAP.md # Future development plans -β”‚ ✨ Add Web-Based Interface with Streamlit +AI-HEALTH-CHATBOT/ +β”œβ”€β”€ backend/ # FastAPI Backend Application +β”‚ β”œβ”€β”€ app/ +β”‚ β”‚ β”œβ”€β”€ Medical_DataBase/ # Stores the FAISS vector index for the RAG model +β”‚ β”‚ β”‚ β”œβ”€β”€ index.faiss +β”‚ β”‚ β”‚ └── index.pkl +β”‚ β”‚ β”œβ”€β”€ models/ # Pydantic schemas for data validation (schemas.py) +β”‚ β”‚ β”œβ”€β”€ routers/ # Defines the API endpoints (e.g., /chat, /disease) +β”‚ β”‚ β”‚ β”œβ”€β”€ chat.py +β”‚ β”‚ β”‚ β”œβ”€β”€ disease.py +β”‚ β”‚ β”‚ └── health.py +β”‚ β”‚ β”œβ”€β”€ services/ # Contains the core business logic for all features +β”‚ β”‚ β”‚ β”œβ”€β”€ disease_predictor.py +β”‚ β”‚ β”‚ β”œβ”€β”€ health_info.py +β”‚ β”‚ β”‚ β”œβ”€β”€ medical_agent.py # Manages the core RAG pipeline and LLM interaction +β”‚ β”‚ β”‚ └── symptom_checker.py +β”‚ β”‚ β”œβ”€β”€ utils/ # Utility and helper functions +β”‚ β”‚ β”œβ”€β”€ config.py # Handles configuration and environment variables +β”‚ β”‚ └── main.py # The main entry point to launch the FastAPI server +β”‚ β”œβ”€β”€ data/ # Directory for raw data files like CSVs +β”‚ └── requirements.txt # A list of all Python dependencies β”‚ -β”œβ”€β”€β”€Build -β”‚ temp # Build-related files +β”œβ”€β”€ client/ # React Frontend Application +β”‚ β”œβ”€β”€ public/ # Contains static assets like the main index.html and icons +β”‚ β”œβ”€β”€ src/ +β”‚ β”‚ β”œβ”€β”€ api/ # Functions for making HTTP requests to the backend +β”‚ β”‚ β”œβ”€β”€ assets/ # Stores local assets like images, fonts, and CSS +β”‚ β”‚ β”œβ”€β”€ components/ # Reusable React components (e.g., ChatWindow, Button) +β”‚ β”‚ β”œβ”€β”€ pages/ # Components representing entire pages or views +β”‚ β”‚ β”œβ”€β”€ App.jsx # The main root component of the application +β”‚ β”‚ └── main.jsx # The entry point for the React application +β”‚ β”œβ”€β”€ package.json # Lists Node.js dependencies and project scripts +β”‚ └── vite.config.js # Configuration file for the Vite build tool β”‚ -β”œβ”€β”€β”€DoctorSpecialistRecommend -β”‚ Disease_Description.csv -β”‚ doctor_spec.py # Doctor recommendation logic -β”‚ Doctor_Specialist.csv -β”‚ Doctor_Versus_Disease.csv -β”‚ Original_Dataset.csv -β”‚ -β”œβ”€β”€β”€Medical_DataBase -β”‚ index.faiss # FAISS index for vector search -β”‚ index.pkl # Pickled embeddings +└── README.md # You are here! ``` -<<<<<<< HEAD - -## Another Documentation -AI-health-chatbot-1/ -β”œβ”€ app/ -β”œβ”€ data/ -β”œβ”€ nlp/ -β”œβ”€ scripts/ -β”œβ”€ requirements.txt -β”œβ”€ README.md # AI Health Chatbot @@ -191,8 +190,7 @@ Medibot is a Streamlit-based AI health assistant that provides symptom checking, ### How to Run: 1. `pip install -r requirements.txt` -2. `python scripts/index_docs.py` -3. `streamlit run app/streamlit_app.py` +2. `streamlit run app/WellnessResourceHub.py` --- @@ -208,9 +206,6 @@ Medibot is a Streamlit-based AI health assistant that provides symptom checking, This chatbot provides general health information and is **not a substitute for professional medical advice**. --- -======= - ->>>>>>> e97a506a8cec23ea3742d75cdeb2cad009baf050

⚑ Installation & Setup

@@ -230,8 +225,8 @@ pip install -r requirements.txt **3️⃣ Set Environment Variables** ```env -GROQ_API_KEY=your_groq_api_key -HUGGINGFACE_API_KEY=your_api_key +GROQ_API_KEY="YOUR_KEY_HERE" +HUGGINGFACE_API_KEY="YOUR_KEY_HERE" ``` **4️⃣ Run the Streamlit app** @@ -349,6 +344,7 @@ Please refer to the [`Code of Conduct`](https://github.com/CharithaReddy18/AI-he We love our contributors! If you'd like to help, please check out our [`CONTRIBUTING.md`](https://github.com/CharithaReddy18/AI-health-chatbot/blob/main/CONTRIBUTING.md) file for guidelines. + >Thank you once again to all our contributors who has contributed to **AI-health-chatbot!** Your efforts are truly appreciated. πŸ’–πŸ‘ diff --git a/from typing import Optional, List, Tuple.py b/backend/app/utils/nlp_utils.py similarity index 100% rename from from typing import Optional, List, Tuple.py rename to backend/app/utils/nlp_utils.py diff --git a/from typing import List, Tuple.txt b/backend/app/utils/text_files/from typing import List, Tuple.txt similarity index 100% rename from from typing import List, Tuple.txt rename to backend/app/utils/text_files/from typing import List, Tuple.txt diff --git a/from typing import List.txt b/backend/app/utils/text_files/from typing import List.txt similarity index 100% rename from from typing import List.txt rename to backend/app/utils/text_files/from typing import List.txt diff --git a/from typing import Optional.txt b/backend/app/utils/text_files/from typing import Optional.txt similarity index 100% rename from from typing import Optional.txt rename to backend/app/utils/text_files/from typing import Optional.txt diff --git a/import os.txt b/backend/app/utils/text_files/import os.txt similarity index 100% rename from import os.txt rename to backend/app/utils/text_files/import os.txt diff --git a/import pytest.txt b/backend/app/utils/text_files/import pytest.txt similarity index 100% rename from import pytest.txt rename to backend/app/utils/text_files/import pytest.txt diff --git a/import streamlit as st.txt b/backend/app/utils/text_files/import streamlit as st.txt similarity index 100% rename from import streamlit as st.txt rename to backend/app/utils/text_files/import streamlit as st.txt From 7a1d355bf38cef4e527a762c90c8bac6ea180353 Mon Sep 17 00:00:00 2001 From: Tejasri Date: Thu, 11 Sep 2025 22:28:34 +0530 Subject: [PATCH 2/2] ReadMe Updated --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1ead242b..b92a34ff 100644 --- a/README.md +++ b/README.md @@ -345,7 +345,7 @@ Please refer to the [`Code of Conduct`](https://github.com/CharithaReddy18/AI-he We love our contributors! If you'd like to help, please check out our [`CONTRIBUTING.md`](https://github.com/CharithaReddy18/AI-health-chatbot/blob/main/CONTRIBUTING.md) file for guidelines. ->Thank you once again to all our contributors who has contributed to **AI-health-chatbot!** Your efforts are truly appreciated. πŸ’–πŸ‘ +->Thank you once again to all our contributors who has contributed to **AI-health-chatbot!** Your efforts are truly appreciated. πŸ’–πŸ‘