blobcity / ai-seed

1000+ ready code templates to kickstart your next AI experiment
https://cloud.blobcity.com
Apache License 2.0
115 stars 54 forks source link

QuestionAnswer_BERT #954

Closed ageerHarikrishna closed 2 years ago

Thilakraj1998 commented 2 years ago

Explain the working of def answer_question(question, answer_text) above it in a markdown instead of using comments.

Change title to Question Answer Application using BRET file name to QuestionAnswer_BERT

Thilakraj1998 commented 2 years ago

Explanation is not up to the mark. It should be in a single flow and should be interactive so that reader under what the function overall does , rather then explaining each steps in a bits of lines

Thilakraj1998 commented 2 years ago

"The function answer_question() accepts the text from the user.\n", "Applies the tokenizer to the input text, treating them as a text pair,\n", "The number of segment A tokens includes the [SEP] token itself. From the text, Construct the list of 0s and 1s. A segment_id for every input token is allocated. Find's the tokens with the highest start and end scores.\n", "Get the string versions of the input tokens and Select the remaining answer tokens and join them with whitespace. Then recombine it with the previous token. Alternatively, add a space and the token."

This whole statements still are not clear what the function does. for example there is no continuity between statements

ageerHarikrishna commented 2 years ago

The function answer_question() accepts the text from the user. Applies the tokenizer to the input text.A segment_id for every input token is allocated. Find's the tokens with the highest start and end scores. Get the string versions of the input tokens and Select the remaining tokens and join them with whitespace. Then recombine it with the previous token.

ageerHarikrishna commented 2 years ago

Now is it ok sir can i update?