how to use demo
xiaomengxin123 opened this issue · comments
xiaomengxin123 commented
Could you tell us how to use r3-demo?
Zae Myung Kim commented
- 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 runstreamlit run main.py
- More details on streamlit, here.