Update README.md
Browse files
README.md
CHANGED
@@ -140,8 +140,12 @@ print(pruned_html)
|
|
140 |
```python
|
141 |
from htmlrag import GenHTMLPruner
|
142 |
|
143 |
-
ckpt_path = "zstanjj/HTML-Pruner-
|
144 |
-
|
|
|
|
|
|
|
|
|
145 |
block_rankings = gen_embed_pruner.calculate_block_rankings(question, pruned_html)
|
146 |
print(block_rankings)
|
147 |
|
|
|
140 |
```python
|
141 |
from htmlrag import GenHTMLPruner
|
142 |
|
143 |
+
ckpt_path = "zstanjj/HTML-Pruner-Phi-3.8B"
|
144 |
+
if torch.cuda.is_available():
|
145 |
+
device="cuda"
|
146 |
+
else:
|
147 |
+
device="cpu"
|
148 |
+
gen_embed_pruner = GenHTMLPruner(gen_model=ckpt_path, max_node_words=5, device=device)
|
149 |
block_rankings = gen_embed_pruner.calculate_block_rankings(question, pruned_html)
|
150 |
print(block_rankings)
|
151 |
|