A Simple and Easy Web Interface for Large Language Models
Large Language Models (LLM’s) have become an integral part of AI algorithms, providing human-like responses to natural language queries. In this article, we introduce the pyChatGPT GUI, an open-source Python wrapper for simplifying the usage of several LLMs such as ChatGPT, AutoGPT, LLaMa, GPT-J, and GPT4All for custom-data and pre-trained inferences. The pyChatGPT GUI offers an easy-to-use web interface for training your own models on custom data and obtaining pre-trained inferences from LLMs. It aims to democratize complex workflows and provide a low-code solution for quick testing.Features
The pyChatGPT GUI offers several built-in application utilities for direct use, including:- Get ChatGPT inferences on your custom data
- Sentiment Analyzer with ChatGPT
- ChatGPT-based Voice Assistant Bot
- Get Auto-GPT inferences for your requirement
- Conversational Retrieval Question & Answer (QA) Chain Bot
- Using open-source GPT4 large language models based on LLaMa and GPT-J
- Get GPT4All models inferences
- Predict label of your inputted text from the predefined tags based on ChatGPT
Installation
To install the pyChatGPT GUI, follow the steps below:Step 1: Create a virtual environment
py -3 -m venv <your_env_name> cd <your_env_name>/Scripts/activate or conda create -n <your_env_name> python=3.x (or 3.x) source activate <your_env_name>
Step 2: Clone the repository
$ git clone https://github.com/ajayarunachalam/pychatgpt_gui $ cd pychatgpt_gui $ sudo bash setup.sh or python setup.py install or $ git clone https://github.com/ajayarunachalam/pychatgpt_gui $ cd pychatgpt_gui $ pip install -r requirements.txt
Step 3: Setup environment configuration for using OpenAI through API
Enter your OpenAI api key in the “api_key.json” file. Note: Please replace the null string with your key.
Step 4: Download the GPT4All model
Download the GPT4All model from http://gpt4all.io/models/ggml-gpt4all-l13b-snoozy.bin and place it under the models/ folder. Alternatively, you can also use GPT4All-J model which can be downloaded from here — https://gpt4all.io/models/ggml-gpt4all-j-v1.3-groovy.bin and similarly place it under the models/ folder in the root directory.
Step 5: Add your own set of documents
Add your own set of documents to train the chatGPT AI bot under the docs/ folder. You could use multiple text files, Scanned files, PDF files, etc. Note: If you have a large table in Excel, you can import it as a CSV or PDF file and then add it to the “docs” folder.
Step 6: Add your own custom documents
Add your own custom documents to train the Q&A chatbot with Conversational Retrieval Chain under the qa_docs/ folder. You can use any of the following file types: text files, pdf files, docx files, and log files.
Step 7: Launch the APP
Linux users type in “sudo bash run_app.sh” in the terminal and Windows users can double-click the “run_app.bat” file. Note: Open the file with an Editor and replace with your virtual directory path in the file.