bernardo-de-almeida commited on
Commit
dc9ea50
·
1 Parent(s): 88d1cd8

feat: add code

Browse files
Files changed (1) hide show
  1. index.html +9 -10
index.html CHANGED
@@ -131,17 +131,16 @@
131
  </div>
132
 
133
  <div class="card">
134
- <h2>Loading</h2>
135
- <p>Depending on how the checkpoint is published, you can load via Transformers-native code or custom code.</p>
136
- <div class="code"><code>from transformers import AutoModel, AutoTokenizer
137
 
138
- model = AutoModel.from_pretrained(
139
- "InstaDeepAI/ntv3_106M_7downsample_post_trained_1mb",
140
- trust_remote_code=True
141
- )
142
- tokenizer = AutoTokenizer.from_pretrained(
143
- "InstaDeepAI/ntv3_106M_7downsample_post_trained_1mb",
144
- trust_remote_code=True
145
  )</code></div>
146
  </div>
147
 
 
131
  </div>
132
 
133
  <div class="card">
134
+ <h2>Model usage (to update)</h2>
135
+ <p>Here is a quick example of how to use NTv3 models.</p>
136
+ <div class="code"><code>from transformers import pipeline
137
 
138
+ pipe = pipeline(
139
+ task="ntv3-tracks",
140
+ model="InstaDeepAI/ntv3_106M_7downsample_post_trained_1mb",
141
+ trust_remote_code=True,
142
+ device="cuda",
143
+ torch_dtype=torch.bfloat16,
 
144
  )</code></div>
145
  </div>
146