Download test.py from hylee719/transcript-analysis-testing: direct link, hf CLI and curl.
- Browser
- Download file 578 Bytes
-
https://huggingface.co/hylee719/transcript-analysis-testing/resolve/337b02ea2e466b8feb74eec7a0daf14af5aeacca/test.py
- Command line
-
hf download hf://hylee719/transcript-analysis-testing@337b02ea2e466b8feb74eec7a0daf14af5aeacca/test.py
-
curl -L -o test.py https://huggingface.co/hylee719/transcript-analysis-testing/resolve/337b02ea2e466b8feb74eec7a0daf14af5aeacca/test.py
578 Bytes
| from handler import EndpointHandler | |
| # init handler | |
| my_handler = EndpointHandler() | |
| # prepare sample payload | |
| example = { | |
| "inputs": [ | |
| {"uid": "1", "speaker": "Alice", "text": "How much is the fish?" }, | |
| {"uid": "2", "speaker": "Bob", "text": "I do not know about the fish. Because you put a long side and it’s a long side. What do you think." }, | |
| {"uid": "3", "speaker": "Alice", "text": "OK, thank you Bob." } | |
| ], | |
| "parameters": { | |
| "uptake_min_num_words": 5, | |
| "uptake_speaker": "Bob", | |
| "filename": "sample.csv" | |
| } | |
| } | |
| # test the handler | |
| print(my_handler(example)) | |