scholarly360
commited on
Commit
•
818925c
1
Parent(s):
8b40651
Update README.md
Browse files
README.md
CHANGED
@@ -77,33 +77,24 @@ Users (both direct and downstream) should be made aware of the risks, biases and
|
|
77 |
|
78 |
Use the code below to get started with the model.
|
79 |
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
prompt = """
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
print(tokenizer.batch_decode(outputs, skip_special_tokens=True))
|
99 |
-
##3
|
100 |
-
prompt = """
|
101 |
-
what is agreement date in "This COLLABORATION AGREEMENT (“Agreement”) dated November 14, 2002, is made by and between ZZZ, INC., a Delaware corporation"
|
102 |
-
"""
|
103 |
-
|
104 |
-
inputs = tokenizer(prompt, return_tensors="pt")
|
105 |
-
outputs = model.generate(**inputs)
|
106 |
-
print(tokenizer.batch_decode(outputs, skip_special_tokens=True))
|
107 |
|
108 |
[More Information Needed]
|
109 |
|
|
|
77 |
|
78 |
Use the code below to get started with the model.
|
79 |
|
80 |
+
```python
|
81 |
+
>>> from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
|
82 |
+
>>> model_name = "scholarly360/contracts-extraction-flan-t5-base"
|
83 |
+
>>> model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
|
84 |
+
>>> tokenizer = AutoTokenizer.from_pretrained(model_name)
|
85 |
+
>>>
|
86 |
+
>>> prompt = """ what kind of clause is "Neither Party shall be liable to the other for any abatement of Charges, delay or non-performance of its obligations under the Services Agreement arising from any cause or causes beyond its reasonable control (a "Force Majeure Event") including, without limitation" """
|
87 |
+
>>> inputs = tokenizer(prompt, return_tensors="pt")
|
88 |
+
>>> outputs = model.generate(**inputs)
|
89 |
+
>>> print(tokenizer.batch_decode(outputs, skip_special_tokens=True))
|
90 |
+
>>>
|
91 |
+
>>> prompt = """ what is agreement date in "This COLLABORATION AGREEMENT (“Agreement”) dated November 14, 2002, is made by and between ZZZ, INC., a Delaware corporation""""
|
92 |
+
>>> inputs = tokenizer(prompt, return_tensors="pt")
|
93 |
+
>>> outputs = model.generate(**inputs)
|
94 |
+
>>> print(tokenizer.batch_decode(outputs, skip_special_tokens=True))
|
95 |
+
|
96 |
+
```
|
97 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
|
99 |
[More Information Needed]
|
100 |
|