Update README.md
Browse files
README.md
CHANGED
@@ -6,4 +6,29 @@ tags:
|
|
6 |
|
7 |
This model has been pushed to the Hub using the [PytorchModelHubMixin](https://huggingface.co/docs/huggingface_hub/package_reference/mixins#huggingface_hub.PyTorchModelHubMixin) integration:
|
8 |
- Library: [More Information Needed]
|
9 |
-
- Docs: [More Information Needed]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
|
7 |
This model has been pushed to the Hub using the [PytorchModelHubMixin](https://huggingface.co/docs/huggingface_hub/package_reference/mixins#huggingface_hub.PyTorchModelHubMixin) integration:
|
8 |
- Library: [More Information Needed]
|
9 |
+
- Docs: [More Information Needed]
|
10 |
+
|
11 |
+
### How to use
|
12 |
+
|
13 |
+
Until its next release, the transformers library needs to be installed from source with the following command in order to use the models.
|
14 |
+
PyTorch should also be installed.
|
15 |
+
|
16 |
+
```
|
17 |
+
pip install --upgrade git+https://github.com/huggingface/transformers.git
|
18 |
+
pip install torch
|
19 |
+
```
|
20 |
+
|
21 |
+
A small snippet of code is given here in order to infer with the model from random input.
|
22 |
+
|
23 |
+
```
|
24 |
+
import torch
|
25 |
+
from transformers import AutoModel
|
26 |
+
|
27 |
+
model = AutoModel.from_pretrained(
|
28 |
+
"InstaDeepAI/sCellTransformer",
|
29 |
+
trust_remote_code=True,
|
30 |
+
)
|
31 |
+
num_cells = model.config.num_cells
|
32 |
+
dummy_gene_expressions = torch.randint(0, 5, (1, 19968 * num_cells))
|
33 |
+
torch_output = model(dummy_gene_expressions)
|
34 |
+
```
|