This documentation will guide you through the steps to get the chatbot up and running on Huggingface Spaces. The chatbot is designed to act like Bart Simpson.
- Go to Huggingface Spaces and create a new space.
- Name your space and select the appropriate settings.
- Create a new file called
app.py
in your Huggingface Space. - Copy the code from
app.py
in this repository and paste it into theapp.py
file in your Huggingface Space.
Go to the Groq Console and grab your API key.
Hugging Face Spaces provides a way to manage secrets securely.
- Navigate to your Hugging Face Space.
- Go to the "Settings" tab.
- Find the "Secrets" section.
- Add a new secret with the name
API_KEY
and paste your API key as the value.
- Create a
requirements.txt
file in your Huggingface Space. - Copy the content from
requirements.txt
in this repository and paste it into therequirements.txt
file in your Huggingface Space. - Save and commit the changes.
After deployment, the URL of the Huggingface Space is used to embed it into the chatbot.html file
- Model Information: We are using the
llama3-8b-8192
model, which is open-sourced by Meta AI. It is specially prompted to behave like Bart Simpson - Performance: Groq provides faster access and supports open-source models efficiently.