Coder Social home page Coder Social logo

docuchat-webui's Introduction

docuchat-webui

This project is a web-based chatbot that uses language processing techniques to answer questions based on a given document. It uses the langchain library for question answering, document splitting, and document loading. The web interface is built with Gradio, which allows users to enter text or a URL to a text file, select a model, and ask a question related to the document.

Demo

Open in Spaces

Installation

  1. Clone this repository.

git clone https://github.com/teragron/docuchat-webui.git

  1. Install the required packages.

pip install -r requirements.txt

Usage

  1. Start the application.

python app.py

  1. Enter a text or an URL to a text file.

  2. Pick a model from the dropdown list.

  3. Enter a question to ask the model.

The model will respond with an answer based on the input document and question.

You can clear the chat history by clicking the "Clear" button.

Files

document_chatbot.py: contains the DocumentChatbot class that handles loading the model and generating responses.

app.py: contains the Gradio interface to interact with the chatbot.

requirements.txt: contains the required libraries to run the project.

Dependencies

This project uses the following libraries:

langchain: for question answering, document splitting, and document loading

huggingface_hub: for loading models from Hugging Face Hub

sentence_transformers: for generating embeddings of documents

gradio: for building the web-based interface

faiss-cpu: for similarity search in the document vectors

Acknowledgements

This project was built by Teragron and is based on the LangChain library created by NLP Odyssey. The LangChain library provides an easy-to-use interface for natural language processing tasks such as question answering and document similarity search. The Gradio library provides a simple way to create web-based interfaces for machine learning models.

docuchat-webui's People

Contributors

teragron avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.