Update README.md
Browse files
README.md
CHANGED
|
@@ -1,7 +1,10 @@
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
---
|
| 4 |
-
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
```python
|
| 7 |
class HelpdeskReviewModel(nn.Module):
|
|
@@ -44,6 +47,11 @@ class HelpdeskReviewModel(nn.Module):
|
|
| 44 |
```
|
| 45 |
|
| 46 |
```python
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
def make_prediction(model, tokenizer, text, max_length=512):
|
| 48 |
# Tokenize the input text and convert to tensor
|
| 49 |
inputs = tokenizer.encode_plus(
|
|
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
---
|
| 4 |
+
import torch
|
| 5 |
+
from torch import nn
|
| 6 |
+
from transformers import RobertaConfig, RobertaModel, RobertaTokenizer
|
| 7 |
+
import torch.optim as optim
|
| 8 |
|
| 9 |
```python
|
| 10 |
class HelpdeskReviewModel(nn.Module):
|
|
|
|
| 47 |
```
|
| 48 |
|
| 49 |
```python
|
| 50 |
+
|
| 51 |
+
tokenizer = RobertaTokenizer.from_pretrained('roberta-base')
|
| 52 |
+
model = HelpdeskReviewModel()
|
| 53 |
+
|
| 54 |
+
|
| 55 |
def make_prediction(model, tokenizer, text, max_length=512):
|
| 56 |
# Tokenize the input text and convert to tensor
|
| 57 |
inputs = tokenizer.encode_plus(
|