Skip to content

Commit 9365bd6

Browse files
committed
Fix docstrings again
1 parent 2053b26 commit 9365bd6

File tree

2 files changed

+195
-126
lines changed

2 files changed

+195
-126
lines changed

src/huggingface_hub/inference/_client.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1487,28 +1487,22 @@ def question_answering(
14871487
align_to_words (`bool`, *optional*):
14881488
Attempts to align the answer to real words. Improves quality on space separated languages. Might hurt
14891489
on non-space-separated languages (like Japanese or Chinese)
1490-
languages. Might hurt on non-space-separated languages (like Japanese or Chinese).
14911490
doc_stride (`int`, *optional*):
14921491
If the context is too long to fit with the question for the model, it will be split in several chunks
14931492
with some overlap. This argument controls the size of that overlap.
1494-
several chunks with some overlap. This argument controls the size of that overlap.
14951493
handle_impossible_answer (`bool`, *optional*):
14961494
Whether to accept impossible as an answer.
14971495
max_answer_len (`int`, *optional*):
14981496
The maximum length of predicted answers (e.g., only answers with a shorter length are considered).
1499-
considered).
15001497
max_question_len (`int`, *optional*):
15011498
The maximum length of the question after tokenization. It will be truncated if needed.
15021499
max_seq_len (`int`, *optional*):
15031500
The maximum length of the total sentence (context + question) in tokens of each chunk passed to the
15041501
model. The context will be split in several chunks (using docStride as overlap) if needed.
1505-
passed to the model. The context will be split in several chunks (using docStride as
1506-
overlap) if needed.
15071502
top_k (`int`, *optional*):
15081503
The number of answers to return (will be chosen by order of likelihood). Note that we return less than
15091504
topk answers if there are not enough options available within the context.
1510-
return less than topk answers if there are not enough options available within the
1511-
context.
1505+
15121506
Returns:
15131507
Union[`QuestionAnsweringOutputElement`, List[`QuestionAnsweringOutputElement`]]:
15141508
When top_k is 1 or not provided, it returns a single `QuestionAnsweringOutputElement`.

0 commit comments

Comments
 (0)