Instructions to use stanford-nlpxed/uptake-model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use stanford-nlpxed/uptake-model with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("stanford-nlpxed/uptake-model") model = AutoModel.from_pretrained("stanford-nlpxed/uptake-model") - Notebooks
- Google Colab
- Kaggle
| from handler import EndpointHandler | |
| # init handler | |
| my_handler = EndpointHandler(path=".") | |
| # prepare sample payload | |
| example = { | |
| "inputs": [ | |
| {"id": "1", "speaker": "Alice", "text": "How much is the fish?" }, | |
| {"id": "2", "speaker": "Bob", "text": "I have no idea, ask Alice" } | |
| ], | |
| "parameters": { | |
| "speaker_1_min_num_words": 5, | |
| "speaker_2": "Bob" | |
| } | |
| } | |
| # test the handler | |
| print(my_handler(example)) | |