Instructions to use ljh1/hello-custom with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ljh1/hello-custom with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="ljh1/hello-custom")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("ljh1/hello-custom") model = AutoModelForSequenceClassification.from_pretrained("ljh1/hello-custom") - Notebooks
- Google Colab
- Kaggle
Add tracing
Browse files- handler.py +2 -0
handler.py
CHANGED
|
@@ -22,8 +22,10 @@ class EndpointHandler:
|
|
| 22 |
os.system('python --version')
|
| 23 |
os.system('python3 --version')
|
| 24 |
os.system('ls')
|
|
|
|
| 25 |
os.system('ps -ef')
|
| 26 |
os.system('uname -a')
|
|
|
|
| 27 |
|
| 28 |
# get inputs
|
| 29 |
inputs = data.pop("inputs", data)
|
|
|
|
| 22 |
os.system('python --version')
|
| 23 |
os.system('python3 --version')
|
| 24 |
os.system('ls')
|
| 25 |
+
os.system('ls huggingface_inference_toolkit')
|
| 26 |
os.system('ps -ef')
|
| 27 |
os.system('uname -a')
|
| 28 |
+
os.system('cat webservice_starlette.py')
|
| 29 |
|
| 30 |
# get inputs
|
| 31 |
inputs = data.pop("inputs", data)
|