Skip to main content

Wordpress articles recommender app using Python

An application to recommend articles from a Wordpress blog based on user's query using semantic search

Pre-requisites:

  • Adjust the below environment variables before running any of the below steps if required:
    • DATA_LOC: Location where all the application data will be stored. By default, it is stored in a data folder in the current directory. This folder will be created if it does not exist during creation.
    • HuggingFace key (free) to use their inference endpoints to generate embeddings using Sentence Transformer models. Export the key to an environment variable called HF_KEY before creating or querying the index as shown in the steps below.
    • Override the default HuggingFace embeddings model by specifying the name in the environment variable HF_EMBEDDINGS_MODEL_NAME. If not provided, the sentence-transformers/all-MiniLM-l6-v2 model is used to generate embeddings.

How to use the CLI after installing the package from PyPI:

  1. Download content: wordpress-recommender download-content "https://learnwoo.com/post-sitemap1.xml"
  2. Build index using the downloaded content: wordpress-recommender generate-index "https://learnwoo.com/post-sitemap1.xml"
  3. Query index built in previous step: wordpress-recommender query-index "https://learnwoo.com/post-sitemap1.xml" --query "How are the AI regulations different in different parts of the world?"

Release notes:

0.1.1

  • Initial release

0.1.2

  • Allow client to override the default HuggingFace inference API embeddings model via the environment variable HF_EMBEDDINGS_MODEL_NAME
  • Allow client to rebuild index by providing the option --rebuild_index in the CLI
  • Breaking change Return final output as a sorted pandas dataframe with all original columns present along with a new column for the score e.g. cosine_distance or cosine_similarity
  • Allow client to override the number of results returned by passing an optional --top parameter with an integer value

0.1.3

  • Minor updates to docs
  • Add tests
  • Add GitHub Actions to publish package

Metadata

Release files for wordpress-recommender 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wordpress-recommender 0.1.3
File Size Uploaded
wordpress_recommender-0.1.3.tar.gz 5.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for wordpress-recommender 0.1.3
File Interpreter ABI Platform
wordpress_recommender-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 15.4 kB

Release files / wordpress_recommender-0.1.3.tar.gz

Download URL wordpress_recommender-0.1.3.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d70d801666854058093c2c7377e4033bd16e6fe31619e5a3dc5b90ed9819c639
BLAKE2b-256 checksum
How to use checksums
eb511da583cd01b165a840d63b33a0195311ce451cb7a4cd17516ad2bc27992a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.6

Release files / wordpress_recommender-0.1.3-py3-none-any.whl

Download URL wordpress_recommender-0.1.3-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e97fb6a079dab86ef7010c0f40dd7be4aec6e971dc554adc66c34154829649c3
BLAKE2b-256 checksum
How to use checksums
7a9bb73353010a73cdd2a3097a03b6d3979a37fa21b9064d0868ae22d2591786
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.6

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page