custom-chatgpt / README.md
daveckw's picture
Edit README.md
ca27c3a

A newer version of the Gradio SDK is available: 5.25.2

Upgrade
metadata
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

  1. Clone the repository:
    git clone https://github.com/yourusername/your-repo-name.git
    cd your-repo-name

  2. Install the required packages: pip install -r requirements.txt

  3. 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

  1. Place your documents in the docs directory.

  2. Run the app.py script:

    python app.py

  3. 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

License

MIT