All Projects → IBM → turi-create-movie-recommender

IBM / turi-create-movie-recommender

Licence: Apache-2.0 License
Creating a movie recommendation system for iOS with Turi Create

Programming Languages

swift
15916 projects
Jupyter Notebook
11667 projects

Projects that are alternatives of or similar to turi-create-movie-recommender

tnnlink
Simple HTTP tunnel using SSH remote port forwarding
Stars: ✭ 21 (-16%)
Mutual labels:  ngrok
magento-ngrok
Magento 2 module for ngrok.io service support
Stars: ✭ 45 (+80%)
Mutual labels:  ngrok
portless
Easy local domains with superpowers
Stars: ✭ 106 (+324%)
Mutual labels:  ngrok
sms-analysis-with-wks
Analyzing SMS offers for domain specific entities using Watson Knowledge Studio and Watson's Natural Language Understanding
Stars: ✭ 17 (-32%)
Mutual labels:  ibmcode
alexa-skill-watson-assistant
Alexa Skill using IBM Watson Assistant and IBM Cloud Functions
Stars: ✭ 72 (+188%)
Mutual labels:  ibmcode
Tutorial-Echobot
Un Bot de Facebook Messenger que te responde lo que tú escribiste.
Stars: ✭ 25 (+0%)
Mutual labels:  ngrok
shark
Best Tool For Phishing, Future Of Phishing
Stars: ✭ 238 (+852%)
Mutual labels:  ngrok
ar-resume-with-visual-recognition
An augmented reality based résumé with Face recognition. The iOS app recognizes the face and presents you with the AR view that contains 3D mock face and details of your resume.
Stars: ✭ 71 (+184%)
Mutual labels:  ibmcode
starter-NodeJS
Recast.AI official starter-kit for NodeJS
Stars: ✭ 22 (-12%)
Mutual labels:  ngrok
docker-symfony
Docker Symfony (PHP-FPM - NGINX - MySQL - MailHog - Redis - RabbitMQ)
Stars: ✭ 32 (+28%)
Mutual labels:  ngrok
django-rok
Public url for your local django web server
Stars: ✭ 19 (-24%)
Mutual labels:  ngrok
watson-discovery-news
A Node.js web app that uses the Watson Discovery News service to query and view the latest trending news items.
Stars: ✭ 39 (+56%)
Mutual labels:  ibmcode
ssh2actions
Connect to GitHub Actions VM via SSH for interactive debugging
Stars: ✭ 62 (+148%)
Mutual labels:  ngrok
watson-document-co-relation
Correlate text content across documents using Watson NLU, Python NLTK and Watson Studio.
Stars: ✭ 28 (+12%)
Mutual labels:  ibmcode
gdpr-fingerprint-pii
Use Watson Natural Language Understanding and Watson Knowledge Studio to fingerprint personal data from unstructured documents
Stars: ✭ 49 (+96%)
Mutual labels:  ibmcode
docker-serveo
https://serveo.net is an alternative for ngrok. taichunmin/serveo can let you secure URL to your localhost server through any NAT or firewall in Docker. And taichunmin/serveo-server can let you host your own serveo.
Stars: ✭ 91 (+264%)
Mutual labels:  ngrok
twitivity
🐍 Twitter Accounts Activity API Client Library for Python
Stars: ✭ 49 (+96%)
Mutual labels:  ngrok
global-citizen
WARNING: This repository is no longer maintained ⚠️ This repository, which contains assets to run a Hyperledger Composer application, is not being actively maintained due to a shift to focus on Hyperledger Fabric. This repository will not be updated. The repository will be kept available in read-only mode.
Stars: ✭ 54 (+116%)
Mutual labels:  ibmcode
watson-stock-advisor
Create a web app for monitoring sentiment, price, and news for individual listed stocks, using IBM Watson Discovery and CloudantDB as well as Nodejs and Alpha Vantage.
Stars: ✭ 89 (+256%)
Mutual labels:  ibmcode
mgrok
在 Ngrok 1.7 版本的基础上,作进一步的完善,支持集群,Nginx 反向代理。
Stars: ✭ 32 (+28%)
Mutual labels:  ngrok

Creating a Movie Recommendation System with Turi Create

This code pattern is an iOS Application that helps you find new movies to watch! It's been built to show you how you can use Turi Create, Apple's new deep learning framework, to build amazing recommendation systems very quickly, locally, on your machine - in under 2 minutes training time.

When the reader has completed this Code Pattern, they will understand how to:

  • Create "Item Similarity" recommender models in Turi Create
  • Use Flask to expose a REST API that provides recommendations based off of users' past movie ratings
  • Call that REST API from Swift to create a GUI around the recommender

Flow

  1. Download the MovieLens latest dataset (at the time of writing, there are 26,000,000 rows of data).
  2. Train an item similarity recommender with turi create on MovieLens.
  3. Expose that model through a REST API with Flask.
  4. Open a tunnel to the REST API with ngrok.
  5. User searches for and rates movies on the iOS app.
  6. iOS app sends the movie rating data to the REST API.
  7. The REST API will provide the iOS App with a list of movies and their scores.
  8. The iOS App will display those movies and scores.
  9. User will watch & rate those movies, and go back to step 6, getting better recommendations every time.

Included components

  • Turi Create: is a task-focused deep learning library - allowing you to build intelligent apps by focusing on the machine learning use case, not the algorithm.
  • Flask: is a micro web framework.
  • ngrok: allows you to open an HTTPS tunnel into your REST API.

Featured technologies

  • Artificial Intelligence: Artificial intelligence can be applied to disparate solution spaces to deliver disruptive technologies.
  • Python: Python is a programming language that lets you work more quickly and integrate your systems more effectively.

Prerequisites

The following are prerequisites to start developing this application:

Steps

  1. Download and organize the latest MovieLens dataset
  2. Train the Turi Create Recommender model
  3. Run the backend
  4. Deploy the iOS app

1. Download and organize the latest MovieLens dataset

In order to get the MovieLens dataset setup, run the following script:

$ sh setup.sh

It'll download the data and move the files to their relevant locations.

2. Train the Turi Create Recommender model

In order for the recommendations to work, you need a trained model. Turi Create is a Python package that will train this model for you.

Go ahead and start your Jupyter Notebooks. In the local_model_training folder, open the TrainRecommendationModel.ipynb notebook. Run the notebook, and once it's done executing, you're going to have a folder called movie_rec, which contains the trained Turi Create model. Unlike other machine learning libraries, Turi Create does not use files for models; instead, it uses folders.

3. Run the backend

Turi Create supports exporting recommender models to CoreML, so they can run on-device, and there's no need for a backend. However, it only works with iOS 12 and above (which is currently in Beta), and there's an issue with linking the custom model framework. Therefore, this code pattern will use a backend that takes requests from the iOS Application, and runs the users' preferences through the Turi Create model, to return predictions as to what the user would like to watch next.

First, copy the movie_rec folder (your trained model) from local_model_training, and paste it into the serverside_prediction_api folder. Once that's done, run the following command from a terminal window within that folder:

FLASK_APP=backend.py flask run

This will run the backend.py file, which is the flask application.

Next, open up a tunnel to the backend with ngrok, so your iOS App can access it:

ngrok http 5000 (change 5000 to whichever port you chose with Flask)

4. Deploy the iOS app

Finally, you can run the front-end of the application.

Start by pointing your iOS app to the backend. Go to the iOS_Frontend/MovieRecommender/MovieRecommender/MovieHandler.swift file, and change the backend constant to the link of the ngrok tunnel.

Then, in the iOS_frontend/MovieRecommender folder, and open the xcworkspace file. Once you're there, run the application by hitting + R or clicking the run button beside the window controls on the top left of Xcode.

License

This code pattern is licensed under the Apache Software License, Version 2. Separate third party code objects invoked within this code pattern are licensed by their respective providers pursuant to their own separate licenses. Contributions are subject to the Developer Certificate of Origin, Version 1.1 (DCO) and the Apache Software License, Version 2.

Apache Software License (ASL) FAQ

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].