Skip to content

Commit

Permalink
chore: minor notebook fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bclavie committed Mar 14, 2024
1 parent cb4377b commit 5978378
Showing 1 changed file with 1 addition and 55 deletions.
56 changes: 1 addition & 55 deletions examples/overview.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,6 @@
"This is all you have to do to load a model, it's now ready to rank documents:"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"from devtools import pprint"
]
},
{
"cell_type": "code",
"execution_count": 6,
Expand Down Expand Up @@ -177,52 +168,7 @@
],
"source": [
"results = ranker.rank(query=query, docs=docs)\n",
"pprint(results)"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[\n",
" Result(\n",
" doc_id=1,\n",
" text='Gone with the wind is an all-time classic',\n",
" score=3.607421875,\n",
" rank=1,\n",
" ),\n",
"]\n"
]
}
],
"source": [
"pprint(results.top_k(1))"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.025711587"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"results.get_score_by_docid(1)\n",
"0.025711587"
"results"
]
},
{
Expand Down

0 comments on commit 5978378

Please sign in to comment.