8000 GitHub - jaideepmurkute/nlp-chatbot
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

jaideepmurkute/nlp-chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

NLP Chatbot with Flask

NLP-LLM based chatbot built using Flask; with custom context handling.
The chatbot performs explicit context management to improve performance of the models with small context size. It does so by methods like 'dynamic proportion based allocation' and 'summarization plus proportional allocation' methods.
The application handles user and model interactions through a RESTful API.

Requirements

  • Python 3.x
  • Flask
  • Other dependencies listed in requirements.txt

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/nlp-chatbot-flask.git
    cd nlp-chatbot-flask
  2. Create a virtual environment:

    python -m venv venv
    source venv/bin/activate  # On Windows use `venv\Scripts\activate`
  3. Install dependencies:

    pip install -r requirements.txt

Usage

  1. Run the Flask application:

    cd src
    

    Start the app:

    python app.py

    OR

    flask run --host=0.0.0.0 --port=5100

    OR

    # Using Docker
    docker-compose up --build
  2. [Optional] Customize the chatbot behavior: Update the config dictionary to customize behavior.

    1. model_name: Any HuggingFace conversational model name.
    2. max_tot_input_prop: Upper ceiling for total input (history + current input)
      • max_hist_input_prop: Maximum proportion of the history tokens within total input.
      • min_hist_input_prop: Minimum proportion of the history tokens within total input.

      (Note: Actual proportaions are updated dynamically after each user input)

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0