Update README.md
Browse files
README.md
CHANGED
@@ -52,7 +52,7 @@ model.to(device)
|
|
52 |
examples = {'appName': ['Google Chrome', 'Google Chrome'], 'review': ['This app is great, the speed is unmatched', 'Bad app, crashes constantly']}
|
53 |
model_inputs = tokenize_function(examples) # assuming example has the fields 'appName' and 'review'. tokenize_function is in the GitHub repo in data_utils.py.
|
54 |
|
55 |
-
outputs = generate(model, model_inputs, return_type = 'labels') # generate() is in the github repo and generates either labels or rationales depening on return_type. Default is 'labels'
|
56 |
tokenizer.decode(outputs[0], skip_special_tokens=True) # prints '"speed": "positive"'
|
57 |
tokenizer.decode(outputs[1], skip_special_tokens=True) # prints '"crashes": "negative"'
|
58 |
|
|
|
52 |
examples = {'appName': ['Google Chrome', 'Google Chrome'], 'review': ['This app is great, the speed is unmatched', 'Bad app, crashes constantly']}
|
53 |
model_inputs = tokenize_function(examples) # assuming example has the fields 'appName' and 'review'. tokenize_function is in the GitHub repo in data_utils.py.
|
54 |
|
55 |
+
outputs = generate(model, model_inputs, return_type = 'labels') # generate() is in the github repo and generates either labels or rationales depening on return_type. Default is 'labels'
|
56 |
tokenizer.decode(outputs[0], skip_special_tokens=True) # prints '"speed": "positive"'
|
57 |
tokenizer.decode(outputs[1], skip_special_tokens=True) # prints '"crashes": "negative"'
|
58 |
|