https://github.com/avinava/my-gpt
code demonstrates how to run nomic-ai gpt4all locally without internet connection
https://github.com/avinava/my-gpt
ai chatbot gpt4all local-gpt python
Last synced: 12 months ago
JSON representation
code demonstrates how to run nomic-ai gpt4all locally without internet connection
- Host: GitHub
- URL: https://github.com/avinava/my-gpt
- Owner: Avinava
- License: mit
- Created: 2023-05-11T08:40:30.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-05-11T18:12:10.000Z (about 3 years ago)
- Last Synced: 2025-02-24T00:30:56.048Z (over 1 year ago)
- Topics: ai, chatbot, gpt4all, local-gpt, python
- Language: Python
- Homepage:
- Size: 44.9 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# my-gpt
code demonstrates how to run nomic-ai gpt4all locally
## Introduction
This code demonstrates how to use the nomic-ai/gpt4all-j model from the Hugging Face transformers library to generate text-based responses to user input in a conversational manner. The program takes user input, passes it to the model, generates a response, and returns it to the user. This process is repeated until the user inputs "bye" or "exit" to end the conversation.
## Installation and Setup
To run this code using Poetry, you will need to have Poetry installed on your system along with Python 3. You can install Poetry by following the instructions in the official [Poetry documentation](https://python-poetry.org/docs/).
- Clone this repository: `git clone git@github.com:Avinava/my-gpt.git`
- Navigate to the project directory: `cd my-gpt`
- Install the required packages using Poetry: `poetry install`
- Note: When you run for the first time, it might take a while to start, since it's going to download the models locally. The models used in this code are quite large, around 12GB in total, so the download time will depend on the speed of your internet connection.
- Note: The performance of the code also depends on the machine you are running it on. Running it on a machine with better CPU and more RAM will result in faster response times.
## Running the Program
To run the program, simply execute the following command in a terminal or command prompt from the project directory:
```bash
poetry run python index.py
```
Once the program is running, it will prompt you to enter a message:
```bash
Welcome to 🤖 my-gpt-bot
You can exit the chatbot at any time by typing 'bye' or 'exit'
🤖 ask my-gpt-bot:
```
You can type your message and press enter to see the chatbot's response. To end the conversation, simply type "bye" or "exit".
