Skip to content

jhe921/movie_prediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Movie Prediction

This is my personal movie prediction repository.

Installation

Basic

First Install PyTorch, example:

conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch

Then install this repository:

pip install git+https://github.com/jhe921/movie_prediction.git

Notebook

Training a principal prediction model requires runniing the principal_prediction notebook. In order to run the notebook you will need:

Language Model Tuning

To run this language model training without the notebook, export the Utterances column of your actor_lines.tsv file to a .txt file and run:

python run_mlm.py --model_name_or_path distilbert-base-uncased \
    --train_file <PATH-TO-YOUR-.txt-FILE> --do_train \
    --output_dir movie_prediction/models/distilbert-base-uncased-movie-tuned \
    --line_by_line --max_seq_len 75

Interactive Streamlit App

To run the interactive streamlit app:

  1. Copy a principal prediction model to movie_prediction/models/principal-prediction-tuned-inference
  2. Type streamlit run app.py into your shell

FastAPI Model Serving

To serve a model with fastapi:

  1. Copy a principal prediction model to movie_prediction/models/principal-prediction-tuned-inference
  2. Type uvicorn main:app into your shell

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published