Skip to content

FL-ChatBot is a chat application combining React and Flask, allowing users to send text and images with federated learning for image classification.

Notifications You must be signed in to change notification settings

OnurSerbes/fl-chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FL-ChatBot

FL-ChatBot is a chat application built with React and Flask that allows users to send text messages and images. The application utilizes a federated learning approach for image classification, enabling the chatbot to learn and improve based on user interactions.

Project Overview

  • Built with: React (client-side), Flask (server-side)
  • Features:
    • Send text messages
    • Send images
    • Image classification with federated learning
    • Real-time chat history and bot responses

Installation

  1. Clone the repository:

    git clone <repository_url>
  2. Navigate to the project directory:

    cd FL-ChatBot
  3. Set up the Flask server:

    a. Navigate to the server directory:

    cd server

    b. Create and activate a virtual environment (optional but recommended):

    python -m venv venv
    source venv/bin/activate  # On Windows, use `venv\Scripts\activate`

    c. Install the required Python packages:

    pip install opencv-python
    pip install flask
    pip install flask-cors
    pip install tensorflow
    pip install keras
    pip install scikit-learn
    pip install flwr
    pip install numpy
    pip install pydicom
    pip install pillow
  4. Set up the React client:

    a. Navigate to the client directory:

    cd ../client

    b. Install the required npm packages:

    npm install
    npm install concurrently
    npm install cross-env

Running the Application

To run both the Flask client and the React client simultaneously, use the following command in the client directory:

npm start

To run the federated learning server, use the following command in the server directory:

python server.py

server.py will perform federated learning after minimum 4 client registiration after first upload.

Usage

  • Interact with the chat interface to send text messages and images.
  • View the chat history and bot responses in real-time.

URLs

Note: The server URL might be used for internal functionalities and might not be relevant to users.

About

FL-ChatBot is a chat application combining React and Flask, allowing users to send text and images with federated learning for image classification.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published