Text Classification
Transformers
PyTorch
roberta
Inference Endpoints
tobischimanski commited on
Commit
60a3ac7
1 Parent(s): bd107b6

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -2
README.md CHANGED
@@ -45,6 +45,7 @@ tokenizer = AutoTokenizer.from_pretrained(tokenizer_name, max_len=512)
45
  pipe = pipeline("text-classification", model=model, tokenizer=tokenizer, device=0)
46
 
47
  # See https://huggingface.co/docs/transformers/main_classes/pipelines#transformers.pipeline
48
- for out in tqdm(pipe(KeyDataset(dataset, "text"), padding=True, truncation=True)):
49
- print(out)
 
50
  ```
 
45
  pipe = pipeline("text-classification", model=model, tokenizer=tokenizer, device=0)
46
 
47
  # See https://huggingface.co/docs/transformers/main_classes/pipelines#transformers.pipeline
48
+ for i, out in enumerate(tqdm(pipe(KeyDataset(dataset, "text"), padding=True, truncation=True))):
49
+ print(dataset["text"][i])
50
+ print(out)
51
  ```