vipulraheja / iterater

Official implementation of the paper "IteraTeR: Understanding Iterative Revision from Human-Written Text" (ACL 2022)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to use demo

xiaomengxin123 opened this issue · comments

Could you tell us how to use r3-demo?

  • To run the R3 demo, we need three models: revision model, binary intent classifier, and intent classifier.
# code/R3_In2Writing2022/baseline_model.py#L107-L110
class BaselineModel:
    def __init__(self, revision_model_path: str = '../models/2021-01-06-multi-intent',
                 binary_classifier_model_path: str = '../models/binary_intent_classifier',
                 intent_classifier_model_path: str = '../models/intent_classifier_src'):
  • These models can be downloaded from Hugging Face Hub:
  • Make sure that the path points to the downloaded directory of the models, and that they are loaded correctly.
  • Then install pip install -r requirements.txt and run streamlit run main.py
    • More details on streamlit, here.