File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed
src/huggingface_hub/inference Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -1502,7 +1502,7 @@ def question_answering(
15021502 model_id = model or self .model
15031503 provider_helper = get_provider_helper (self .provider , task = "question-answering" , model = model_id )
15041504 request_parameters = provider_helper .prepare_request (
1505- inputs = None ,
1505+ inputs = { "question" : question , "context" : context } ,
15061506 parameters = {
15071507 "align_to_words" : align_to_words ,
15081508 "doc_stride" : doc_stride ,
@@ -1512,7 +1512,6 @@ def question_answering(
15121512 "max_seq_len" : max_seq_len ,
15131513 "top_k" : top_k ,
15141514 },
1515- extra_payload = {"question" : question , "context" : context },
15161515 headers = self .headers ,
15171516 model = model_id ,
15181517 api_key = self .token ,
Original file line number Diff line number Diff line change @@ -1551,7 +1551,7 @@ async def question_answering(
15511551 model_id = model or self .model
15521552 provider_helper = get_provider_helper (self .provider , task = "question-answering" , model = model_id )
15531553 request_parameters = provider_helper .prepare_request (
1554- inputs = None ,
1554+ inputs = { "question" : question , "context" : context } ,
15551555 parameters = {
15561556 "align_to_words" : align_to_words ,
15571557 "doc_stride" : doc_stride ,
@@ -1561,7 +1561,6 @@ async def question_answering(
15611561 "max_seq_len" : max_seq_len ,
15621562 "top_k" : top_k ,
15631563 },
1564- extra_payload = {"question" : question , "context" : context },
15651564 headers = self .headers ,
15661565 model = model_id ,
15671566 api_key = self .token ,
You can’t perform that action at this time.
0 commit comments