{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## Installation" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Using PIP" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Simply use PIP to install malaya,\n", "\n", "```bash\n", "pip3 install malaya\n", "```\n", "\n", "It will automatically all dependencies except for Tensorflow and PyTorch. So you can choose your own Tensorflow CPU / GPU version and PyTorch CPU / GPU version.\n", "\n", "Make sure **Tensorflow >= 1.15.0**, and **PyTorch >= 1.10**." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Getting started" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import malaya" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "If no error or warning, you are good to go!" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Simple sentiment analysis" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [], "source": [ "model = malaya.sentiment.transformer(model = 'tiny-albert')" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "text/html": [ "