Code Monkey home page Code Monkey logo

chatbot_gpt2's Introduction

Chatbot using GPT-2

This project implements a chatbot using the GPT-2 model for generating responses based on input prompts.

Overview

The chatbot is built using the following components:

GPT-2 Model:

A pre-trained language model from Hugging Face Transformers library.

FastAPI:

A Python framework for building APIs quickly and easily.

Streamlit:

A Python library for building interactive web apps.

Features

Generation of Text: Given an input prompt, the chatbot generates text based on the GPT-2 model.

API Endpoint:

Provides a RESTful API endpoint /generate/ to interact with the chatbot.

Web Interface:

Uses Streamlit for a user-friendly web interface to interact with the chatbot.

Installation

Clone the repository:

bash Copy code git clone https://github.com/rushi-k12/Chatbot_GPT2.git cd Chatbot_GPT2 Install dependencies:

bash Copy code pip install -r requirements.txt

Deployment Link:

https://huggingface.co/spaces/rushi-k/app_11

Usage

Running the API bash Copy code uvicorn app:app --host 0.0.0.0 --port 8000 Access the API at http://localhost:8000. Running the Streamlit App bash Copy code streamlit run streamlit_app.py Access the Streamlit app in your browser at http://localhost:8501. API Endpoint Generate Text Endpoint: /generate/ Method: GET

Query Parameters:

prompt: The input prompt for generating text.

Response:

json Copy code { "generated_text": "Generated response from the chatbot." }

Contributing

Contributions are welcome! If you'd like to improve the project, feel free to fork the repository and submit a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

chatbot_gpt2's People

Contributors

rushi-k12 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.