Upload model card
Browse files
README.md
CHANGED
|
@@ -36,13 +36,12 @@ pip install como-ocsr
|
|
| 36 |
## Usage
|
| 37 |
|
| 38 |
```python
|
| 39 |
-
from como.model import ComoModel
|
| 40 |
-
model = ComoModel.from_pretrained("Keylab/COMO-Tanimoto", device="cuda")
|
| 41 |
-
|
| 42 |
-
# or download checkpoint from HuggingFace:
|
| 43 |
-
# huggingface-cli download Keylab/COMO models/tanimoto/final.pth
|
| 44 |
import como
|
| 45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
|
| 47 |
# Single image prediction
|
| 48 |
smiles = como.predict(model, "molecule.png")
|
|
|
|
| 36 |
## Usage
|
| 37 |
|
| 38 |
```python
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
import como
|
| 40 |
+
# Load pretrained checkpoints from Hugging Face
|
| 41 |
+
model = como.load_model("Keylab/COMO-Tanimoto")
|
| 42 |
+
# or download checkpoint files from HuggingFace:
|
| 43 |
+
# huggingface-cli download Keylab/COMO models/tanimoto/final.pth
|
| 44 |
+
model = como.load_model(checkpint_path="models/tanimoto/final.pth")
|
| 45 |
|
| 46 |
# Single image prediction
|
| 47 |
smiles = como.predict(model, "molecule.png")
|