Skip to main content

Text-based Recommendation Engine using Cohere NLP

Project description

Osusume (おすすめ)

Text-Based Recommendation Engine using Cohere

Osusume is a library to implement text-based recommendation engine using Cohere Embeddings and Generation API. Initally was built for a Hacktahon Submission hosted by Lablab.AI and Cohere.

View Changelog

Quick Start

import pandas as pd

import nltk
nltk.download('wordnet')
nltk.download('omw-1.4')

from osusume import Osusume

anime_df = pd.read_json('anime_sm.json')

engine = Osusume.from_dict({
    'token': '<cohere-token>',
    'dataset': anime_df,
    'sentiment_column': 'synopsis',
    'response_prompt': 'anime_data.txt',
    'response_column': [
        ('Title', 'title'),
        ('Synopsis', 'synopsis')
    ]
}).fit()

engine.predict(
    query='animes about monsters and aliens from another world', 
    n_out=3
)

# Top 3 Anime's from given Query

Installation

~ pip install osusume --upgrade

You need to use Pip to install osusume. Conda package is currently unavailable.

Requirements

  • Python >= 3.8
  • Cohere
  • Pandas
  • Numpy
  • Scikit Learn
  • NLTK

Author

  • Abhishta Gatya (Email) - Software and Machine Learning Engineer

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

osusume-1.0.1.tar.gz (12.1 kB view hashes)

Uploaded Source

Built Distribution

osusume-1.0.1-py3-none-any.whl (16.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page