Welcome to Recommenado! It's a light weight, run-anywhere article recommendation tool. Install the Python package, get an API key, and get started.
This package is under active development, so check back often for new features and tools. Or, fork this repo and make your own improvements!
git clone https://github.com/aaronbrezel/recommenado.git
Recommenado is best run in a dedicated python virtual environment. We like pyenv, but any virtual env will do.
pyenv virtualenv 3.12 recommenado
pyenv activate recommenado
Install Recommenado into your newly created virtual environment
pip install -e .
Developer's note: Recommanado's source code is meant to be run locally, tweaked and played with. That's why we encorage you to install it in editable mode. If you want a "production" version of the application, see Docker start.
You'll need a Google GenAI API key to help generate recommendations. Use this link to get your personal API key. Once you have it, navigate over to ./recommenado/recommend/model.py and paste the value into genai.configure(api_key="<your api key goes here>")
.
Developer's note: this API key is your responsibility. Keep it secret, keep it safe. Only share it with people you trust. And for the love of all that is holy, do not commit it to a public GitHub repository.
For now, Recommenado's backend article database consists of a single ;
-separated .csv
file located at ./recommenado/recommend/articlesembeds.csv.
The file consists of two tabular columns: article ID and article embedding.
To upload articles to the recommendation database, add rows to the csv. Embeddings can be generated à la carte using the following script:
import google.generativeai as genai
genai.configure(api_key="<your api key goes here>")
text = '<your article text here>'
embedding = genai.embed_content(model='models/text-embedding-004', content=text, task_type='models/text-embedding-004')['embedding']
print(embedding)
Developer's note: we're working on a smoother article database upload experience that does not require directly editing a .csv
file.
Start the recommenado server
recommenado
Your ready to start generating article recommendations. Recommendations are available through the following URLs:
http://localhost:8888/recommend_api?article_title=hello&article_text=world
or
http://localhost:8888/recommend
TK!