Skip to content

dennis-gonzales/medium-article-generator

Repository files navigation

About the project

Medium Article Generator Built with Langchain and LLM's (ChatGPT, GPT-4, etc)

Getting Started

conda create --prefix ./env jupyter
pip install -r requirements.txt

Commands Used for Setting up the Project

pip install python-dotenv streamlit langchain openai wikipedia chromadb tiktoken pipreqs

Activate

# use `conda info --envs` to list all your envs
conda activate /PATH_TO_PROJ/env

Run Jupyter Notebook

jupyter notebook

Run Jupyter Notebook in VSCode

Open the Jupyter Notebook file and make sure that the correct kernel is selected.

Run Streamlit (WebUI)

streamlit run app.py

Deactivate

conda deactivate

Troubleshooting

Selecting The Correct Kernel

Make sure you've selected the correct environment to run on.

e.g. python <python-version> (conda) .\env\python.exe

Installing ChromaDB

If you received an error ERROR: Could not build wheels for chroma-hnswlib, which is required to install pyproject.toml-based projects check HERE.

Adding Path

# ~/.bashrc or ~/.zshrc
export PATH=$PATH:~/.local/bin

The export PATH=$PATH:~/.local/bin command adds the ~/.local/bin directory to the list of places your system looks for executable programs. This allows you to run programs installed in ~/.local/bin directly from the terminal.

Extra

Agents

python agent.py
# When did the titanic sank? how many years has it been since then? how many people who survived? multiply these two values together.