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.pyin your Huggingface Space. - Copy the code from
app.pyin this repository and paste it into theapp.pyfile 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_KEYand paste your API key as the value.
- Create a
requirements.txtfile in your Huggingface Space. - Copy the content from
requirements.txtin this repository and paste it into therequirements.txtfile 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-8192model, 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.