Text Classification
Transformers
Safetensors
English
HHEMv2Config
custom_code
simonhughes22 commited on
Commit
c1c12b0
1 Parent(s): 845f97b

Update README.md

Browse files

Add Walhberg - Manny example

Files changed (1) hide show
  1. README.md +6 -4
README.md CHANGED
@@ -26,13 +26,14 @@ model.predict([
26
  ["A person on a horse jumps over a broken down airplane.", "A person is outdoors, on a horse."],
27
  ["A boy is jumping on skateboard in the middle of a red bridge.", "The boy skates down the sidewalk on a blue bridge"],
28
  ["A man with blond-hair, and a brown shirt drinking out of a public water fountain.", "A blond drinking water in public."],
29
- ["A man with blond-hair, and a brown shirt drinking out of a public water fountain.", "A blond man wearing a brown shirt is reading a book."],
 
30
  ])
31
  ```
32
 
33
  This returns a numpy array:
34
  ```
35
- array([6.1051625e-01, 4.7493601e-04, 9.9639291e-01, 2.1221593e-04, 9.9599433e-01, 1.4126947e-03], dtype=float32)
36
  ```
37
 
38
  ## Usage with Transformers AutoModel
@@ -50,7 +51,8 @@ pairs = [
50
  ["A person on a horse jumps over a broken down airplane.", "A person is outdoors, on a horse."],
51
  ["A boy is jumping on skateboard in the middle of a red bridge.", "The boy skates down the sidewalk on a blue bridge"],
52
  ["A man with blond-hair, and a brown shirt drinking out of a public water fountain.", "A blond drinking water in public."],
53
- ["A man with blond-hair, and a brown shirt drinking out of a public water fountain.", "A blond man wearing a brown shirt is reading a book."],
 
54
  ]
55
 
56
  inputs = tokenizer.batch_encode_plus(pairs, return_tensors='pt', padding=True)
@@ -64,5 +66,5 @@ with torch.no_grad():
64
 
65
  This returns a numpy array:
66
  ```
67
- array([6.1051559e-01, 4.7493709e-04, 9.9639291e-01, 2.1221573e-04, 9.9599433e-01, 1.4127002e-03], dtype=float32)
68
  ```
 
26
  ["A person on a horse jumps over a broken down airplane.", "A person is outdoors, on a horse."],
27
  ["A boy is jumping on skateboard in the middle of a red bridge.", "The boy skates down the sidewalk on a blue bridge"],
28
  ["A man with blond-hair, and a brown shirt drinking out of a public water fountain.", "A blond drinking water in public."],
29
+ ["A man with blond-hair, and a brown shirt drinking out of a public water fountain.", "A blond man wearing a brown shirt is reading a book."],
30
+ ["Mark Wahlberg was a fan of Manny.", "Manny was a fan of Mark Wahlberg."],
31
  ])
32
  ```
33
 
34
  This returns a numpy array:
35
  ```
36
+ array([6.1051559e-01, 4.7493709e-04, 9.9639291e-01, 2.1221573e-04, 9.9599433e-01, 1.4127002e-03, 2.8262993e-03], dtype=float32)
37
  ```
38
 
39
  ## Usage with Transformers AutoModel
 
51
  ["A person on a horse jumps over a broken down airplane.", "A person is outdoors, on a horse."],
52
  ["A boy is jumping on skateboard in the middle of a red bridge.", "The boy skates down the sidewalk on a blue bridge"],
53
  ["A man with blond-hair, and a brown shirt drinking out of a public water fountain.", "A blond drinking water in public."],
54
+ ["A man with blond-hair, and a brown shirt drinking out of a public water fountain.", "A blond man wearing a brown shirt is reading a book."],
55
+ ["Mark Wahlberg was a fan of Manny.", "Manny was a fan of Mark Wahlberg."],
56
  ]
57
 
58
  inputs = tokenizer.batch_encode_plus(pairs, return_tensors='pt', padding=True)
 
66
 
67
  This returns a numpy array:
68
  ```
69
+ array([6.1051559e-01, 4.7493709e-04, 9.9639291e-01, 2.1221573e-04, 9.9599433e-01, 1.4127002e-03, 2.8262993e-03], dtype=float32)
70
  ```