Skip to content

Template for building a chatbot using TypeScript and Next.js, powered by the Hugging Face API

License

Notifications You must be signed in to change notification settings

ElonMusk2002/chat-huggingface

Repository files navigation

🚀Hugging Face Chatbot🤖

GitHub stars GitHub forks GitHub issues

This project is a template for building a chatbot using TypeScript and Next.js, powered by the Hugging Face API. With this template, you can quickly set up a chatbot that uses the Open Assistant SFT-4 12B model to answer various questions and engage in conversations on different topics.

Screenshot of the Chatbot

Screenshot of the Chatbot
Deploy the example using Vercel:

Deploy with Vercel

Example Chatbot using Hugging Face and Next.js

Welcome to a simple chatbot application using Hugging Face and Next.js. This application provides a basic user interface for users to interact with the Open Assistant SFT-4 12B model. With just a few clicks you can chat with a fine-tuned English language model designed for conversation.

Here are some key features of the application:

  • 🤖 Easy-to-use chat interface
  • 🚀 Quick and responsive
  • 🤪 Fun to chat with!

About Hugging Face

Hugging Face is a company that develops tools for building applications using machine learning. It is most notable for its 🤖 Transformers Python library built for natural language processing applications and its platform that allows users to share machine learning models and datasets.

About Open Assistant

The model in the example is Open Assistant SFT-4 12B. This is the 4th iteration English supervised-fine-tuning (SFT) model of the Open-Assistant project. It is based on a Pythia 12B that was fine-tuned on human demonstrations of assistant conversations collected through the Open Assistant human feedback web app before March 25, 2023.

Deploy your own

To run the example locally you need to:

  1. Sign up at Hugging Face.
  2. Go to your Hugging Face account settings. Create a User Access Token with write access.
  3. Set the required Hugging Face environment variable with the token as shown the example env file but in a new file called .env.local.
  4. Clone the repository, git clone https://github.com/ElonMusk2002/chat-huggingface.git
  5. Install the required dependencies with npm install
  6. Launch the development server with npm dev

🛠️ Built With

Tech Stack

TypeScript Next.js Tailwind CSS

Tools Used

Git GitHub Visual Studio Code Vercel

🤝 Contributing

If you want to contribute to this project, feel free to open a pull request or an issue on GitHub. Before submitting any changes, please make sure you follow these guidelines:

  • Check if someone else has already reported the same issue or suggested the same improvement.
  • Create a new branch for your changes and use descriptive branch names.
  • Write clear commit messages and add comments to your code.
  • Make sure your changes are properly tested.
  • Update the documentation if necessary.

Thank you for your contributions!