Update README.md
Browse files
README.md
CHANGED
@@ -9,9 +9,10 @@ All credit for the original work goes to Tymor Hamamsy and the following authors
|
|
9 |
|
10 |
We have added a Huggingface compatible wrapper for the model in protvec.py
|
11 |
|
12 |
-
Please consider liking
|
13 |
|
14 |
```
|
|
|
15 |
https://github.com/lhallee/ProteinVecHuggingface
|
16 |
```
|
17 |
|
@@ -37,6 +38,14 @@ model = model.cuda() # remove if cpu inference
|
|
37 |
embedding = model.embed('SEQWENCE').detach().cpu() # torch.tensor(1, 512)
|
38 |
```
|
39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
To half precision weights
|
41 |
```
|
42 |
model.to_half()
|
@@ -72,5 +81,4 @@ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
72 |
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
73 |
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
74 |
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
75 |
-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
76 |
-
|
|
|
9 |
|
10 |
We have added a Huggingface compatible wrapper for the model in protvec.py
|
11 |
|
12 |
+
Please consider liking the model page and starring the github repo if you are going to use it :)
|
13 |
|
14 |
```
|
15 |
+
https://huggingface.co/lhallee/ProteinVec
|
16 |
https://github.com/lhallee/ProteinVecHuggingface
|
17 |
```
|
18 |
|
|
|
38 |
embedding = model.embed('SEQWENCE').detach().cpu() # torch.tensor(1, 512)
|
39 |
```
|
40 |
|
41 |
+
Use a particular AspectVec by setting the ```inference_mask```
|
42 |
+
```
|
43 |
+
model.aspect_to_keys_dict # dictionary showing the aspects
|
44 |
+
### The model is set to ALL by default to use full ProteinVec
|
45 |
+
model.inference_mask = model.get_mask('EC') # for Enzyme Comission AspectVec
|
46 |
+
embedding = model.embed(...)
|
47 |
+
```
|
48 |
+
|
49 |
To half precision weights
|
50 |
```
|
51 |
model.to_half()
|
|
|
81 |
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
82 |
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
83 |
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
84 |
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|