Giter Site home page Giter Site logo

alperiox / review-classification-kili-hf-automl Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 23.77 MB

Opinion classification with kili-technology and huggingface by fine-tuning roBERTa model.

Home Page: https://kili-technology.com/blog/opinion-classification-with-kili-technology-and-huggingface-automl

Jupyter Notebook 98.30% Python 1.70%
machine-learning deep-learning pytorch review-analysis nlp

review-classification-kili-hf-automl's Introduction

Opinion Classification with Kili Technology and HuggingFace AutoML

The project repository for this article.

Just clone the repository and download the models by using scripts/download_models.py

I haven't included the torch installation in the requirements.txt. That's because the installation procedure wouldn't be same for everyone.

I have used PROJECT_ID and KILI_API_KEY environment variables to pass the API key and the project ID. I was using dotenv to load the environment variables from .env file.

Scripts usage:

collect_reviews.py

Script to collect the reviews by using google-play-scraper

Arguments

lang (l): The language reviews written in, default: English

country (c): The country to pull the reviews from, default: US

name (n): Package name of the application (Google Play Store)

count (co): Number of reviews to collect, default:10, all to get all reviews

filter (f): Integer to filter the reviews by rating, None for all rating. default: None

help: Shows the argument descriptions

Usage

python scripts/collect_reviews.py -co 100 --name medium.com.reader

download_models.py

Downloads the pre-trained models (finetuned models for 40 and 20 runs) into the current working directory. Uses gdown to download the models from google drive. Folder ID can be found in the script file

Arguments

None

Usage

python scripts/download_models.py

move_diff_to_review.py

Moves the distinct elements of the given two datasets into To Review section in the project.

Arguments

first: first CSV dataset to load,

second: second CSV dataset to load

Usage

python scripts/move_diff_to_review.py --first data/processed/dataset-2.csv --second data/processed/dataset-3.csv

prepare_dataset.py

Pulls the labeled and reviewed data separately and saves it with the given file name in data/processed folder.

Arguments

output_name: File name for the pulled dataset. (it should include .csv extension too)

remove (optional): Label to remove from the dataset

Usage

python scripts/prepare_dataset.py --output_name final_dataset.csv

review-classification-kili-hf-automl's People

Contributors

alperiox avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.