Update README.md
Browse files
README.md
CHANGED
@@ -42,6 +42,6 @@ max_seq_len = 510
|
|
42 |
|
43 |
pipe = pipeline(model=model_name, device=device, truncation=True, max_length=max_seq_len)
|
44 |
is_it_a_joke = """A nervous passenger is about to book a flight ticket, and he asks the airlines' ticket seller, "I hope your planes are safe. Do they have a good track record for safety?" The airline agent replies, "Sir, I can guarantee you, we've never had a plane that has crashed more than once." """
|
45 |
-
result = pipe(is_it_a_joke) # [{'label': '
|
46 |
-
print('This is a joke') if result[0]['label'] == '
|
47 |
```
|
|
|
42 |
|
43 |
pipe = pipeline(model=model_name, device=device, truncation=True, max_length=max_seq_len)
|
44 |
is_it_a_joke = """A nervous passenger is about to book a flight ticket, and he asks the airlines' ticket seller, "I hope your planes are safe. Do they have a good track record for safety?" The airline agent replies, "Sir, I can guarantee you, we've never had a plane that has crashed more than once." """
|
45 |
+
result = pipe(is_it_a_joke) # [{'label': 'POSITIVE', 'score': 0.7313136458396912}]
|
46 |
+
print('This is a joke') if result[0]['label'] == 'POSITIVE' else print('This is not a joke')
|
47 |
```
|