Skip to content

WeskerPRO/LLM-Speaker-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Demo LLM Bot 🤖

Version

An AI Doctor Chat Bot powered by SmolLM2-1.7B-Instruct, featuring a Java desktop UI with a full registration/login system and a Python AI backend.

What is this?

A desktop application where users can chat with an AI Doctor bot. The app includes a secure registration and login system before accessing the chat. The AI model was custom trained to act as a medical assistant.

Project Structure

project/
├── brain_api/              # Python backend
│   ├── chat_lung_model/    # AI model files (not included, see Setup)
│   ├── main.py             # Runs the API server
│   ├── train.py            # Training script for the AI model
│   └── db_manager.py       # Database helper (connects to Java's database)
│
└── chat_app/               # Java desktop frontend
    ├── src/java/chat_ui/
    │   ├── ChatWindow.java           # Main app window (chat with AI Doctor)
    │   ├── Database.java             # Creates and manages the database
    │   ├── Login.java                # Login window (called by ChatWindow)
    │   ├── Registration.java         # Registration system (email, password, birthdate, email verification)
    │   ├── PasswordUpdateDialog.java # Password reset request (email input)
    │   └── RequestResetDialog.java   # Password reset process window
    ├── src/resources/
    └── pom.xml

Features

  • 🔐 Secure Auth System — Register, Login, Email Verification, Password Reset
  • 🤖 AI Doctor Bot — Powered by SmolLM2-1.7B-Instruct (custom trained)
  • 💬 Chat — Users can text the AI Doctor
  • 🗄️ Integrated Database — Java manages the DB, Python connects to it

How It Works

  1. User launches ChatWindow.java
  2. Login screen appears (always, for security)
  3. New users can Register with email, password, and birthdate → email verification required
  4. Forgot password? → Request reset via email
  5. Once logged in → Chat with the AI Doctor Bot 🩺

Requirements

Brain API (Python)

  • Python 3.12+
  • Dependencies:
pip install -r requirements.txt
  • Download or train the AI model and place it in brain_api/chat_lung_model/

Chat App (Java)

  • Java 17+
  • Maven

Setup & Run

1. Start the Python API

cd brain_api
python main.py

2. Run the Java App

cd chat_app
mvn install
mvn exec:java

Or simply run ChatWindow.java from your IDE.

Notes

⚠️ AI model files are not included in this repository due to size limitations. Download or train the model separately and place it in brain_api/chat_lung_model/

Email Configuration (Required)

This app uses Gmail SMTP for email verification and password reset.

Steps:

  1. Open brain_api/main.py
  2. Fill in your Gmail credentials:
SENDER_EMAIL = "your_email@gmail.com"
SENDER_PASSWORD = "your_app_password"

How to get a Gmail App Password:

  1. Go to your Google Account → Security
  2. Enable 2-Step Verification (if not already)
  3. Go to SecurityApp Passwords
  4. Select app: Mail → Select device: Windows/Mac
  5. Google will generate a 16-character password → paste it into SENDER_PASSWORD

⚠️ Never share or commit your email credentials to GitHub! Consider using a .env file to store them securely:

import os
SENDER_EMAIL = os.getenv("SENDER_EMAIL")
SENDER_PASSWORD = os.getenv("SENDER_PASSWORD")

Then add .env to your .gitignore

Roadmap

✅ Completed

  • ✅ Python LLM backend (SmolLM2-1.7B-Instruct)
  • ✅ Custom AI model training
  • ✅ Java Chat UI
  • ✅ Registration & Login system
  • ✅ Email verification & Password reset
  • ✅ Persistent chat history — all conversations saved to database and reloaded per user
  • ✅ Async AI requests — UI never freezes while AI is responding

🚧 Upcoming

  • Flutter mobile app integration (Android & iOS)
  • Flutter web app integration
  • Upgrade to a more sophisticated LLM model (Mistral 7B / LLaMA)
  • AI Food & Recipe Coach — user inputs available ingredients, AI suggests meals and acts as a nutrition coach
  • Voice input — user speaks to the AI Doctor (Speech-to-Text)
  • Voice output — AI Doctor responds with voice (Text-to-Speech)
  • Conversation memory — AI remembers previous messages in session
  • User health profile — store age, weight, medical history
  • Dark / Light mode toggle

License

MIT

About

Mini App written in Java that allows the user to talk with mini AI bot who is a doctor

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors