This repository contains the source code for getting started with LLMs. The project is developed in Python and leverages advanced language models to generate descriptive text based on user-defined topics and word counts.
- Generate descriptive text on any topic within a specified word count.
- Utilize pre-trained language models from the Hugging Face model hub.
- Accept command-line arguments for topic selection and word count customization.
- Easily customize prompts and language model configurations for specialized use cases.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- Python (version 3.12)
- Pipenv
-
Clone the repository:
git clone https://github.com/guptaachin/learn-llmchain.git
-
Navigate to the project directory:
cd learn-llmchain
-
Run the
run.sh
script:-
On Linux:
./run.sh
-
On Windows (using Git Bash or similar):
bash run.sh
-
-
Follow the on-screen instructions to install Pipenv if it's not already installed.
-
After running the
run
script, activate the virtual environment:pipenv shell
-
Follow the additional instructions provided after activating the virtual environment.
-
Create a Hugging Face API token. You can create one here.
-
Create a
.env
file in the current directory. Add your Hugging Face API token to the.env
file asHUGGINGFACE_TOKEN=your_token_here
. -
Run your Python application using:
python main.py --topic life --length 5
This project is licensed under the MIT License - see the LICENSE.md file for details.