Spaces:
Build error
A newer version of the Gradio SDK is available:
5.25.2
title: Custom Chatgpt
emoji: 💩
colorFrom: gray
colorTo: pink
sdk: gradio
sdk_version: 3.24.1
app_file: app.py
pinned: false
Custom-trained AI Chatbot
This repository contains a custom-trained AI chatbot that uses OpenAI's GPT-3.5 Turbo model to provide responses based on a user's input. The chatbot utilizes an index of documents to generate relevant and informative responses.
Prerequisites
Before you begin, ensure you have the following installed on your machine:
- Python 3.6 or higher
- pip
Installation
Clone the repository:
git clone https://github.com/yourusername/your-repo-name.git
cd your-repo-name
Install the required packages:
pip install -r requirements.txt
Create a
.env
file in the project's root directory and add your OpenAI API key:OPENAI_API_KEY=your_openai_api_key
ChatGPT model name
model_name="gpt-3.5-turbo"
Most capable GPT-3.5 model and optimized for chat at 1/10th the cost of text-davinci-003.
or
model_name="text-davinci-003"
Usage
Place your documents in the
docs
directory.Run the
app.py
script:python app.py
Open the Gradio interface in your web browser, enter your text in the input textbox, and click "Submit" to get a response from the chatbot.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Setup at Hugging Face
Check out the configuration reference at
https://huggingface.co/docs/hub/spaces-config-reference