Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/arijitx/QnA-Bot
/ functions
Functions
93 in github.com/arijitx/QnA-Bot
⨍
Functions
93
◇
Types & classes
28
↳
Endpoints
4
↓ 23 callers
Method
__init__
(self, config)
modeling.py:400
↓ 3 callers
Method
load
(module, prefix='')
modeling.py:645
↓ 3 callers
Function
new_tok
(s)
infer_utils.py:262
↓ 3 callers
Method
transpose_for_scores
(self, x)
modeling.py:310
↓ 2 callers
Function
_strip_spaces
(text)
infer_utils.py:823
↓ 2 callers
Function
formatAMPM
(date)
static/chat_main.js:1
↓ 2 callers
Method
from_pretrained
Instantiate a BertPreTrainedModel from a pre-trained model file or a pytorch state dict. Download and cache the pre-trained model fil
modeling.py:542
↓ 2 callers
Function
is_whitespace
(c)
infer.py:32
↓ 2 callers
Function
is_whitespace
(c)
infer_utils.py:152
↓ 2 callers
Method
to_json_string
Serializes this instance to a JSON string.
modeling.py:234
↓ 1 callers
Method
__repr__
(self)
infer_utils.py:65
↓ 1 callers
Function
_check_is_max_context
Check if this is the 'max context' doc span for the token.
infer_utils.py:530
↓ 1 callers
Function
_compute_softmax
Compute softmax probability over raw logits.
infer_utils.py:903
↓ 1 callers
Function
_improve_answer_span
Returns tokenized answer spans that better match the annotated answer.
infer_utils.py:493
↓ 1 callers
Function
convert_examples_to_features
Loads a data file into a list of `InputBatch`s.
infer_utils.py:254
↓ 1 callers
Function
f1_bow
(src,tgt)
infer_utils.py:124
↓ 1 callers
Function
find_gt_span
(query,tokens,start,end)
infer_utils.py:134
↓ 1 callers
Method
from_dict
Constructs a `BertConfig` from a Python dictionary of parameters.
modeling.py:212
↓ 1 callers
Method
from_json_file
Constructs a `BertConfig` from a json file of parameters.
modeling.py:220
↓ 1 callers
Function
gen_upper_triangle
(score_s, score_e, max_len, use_cuda=False)
modeling.py:53
↓ 1 callers
Function
get_final_text
Project the tokenized prediction back to the original text.
infer_utils.py:795
↓ 1 callers
Function
is_punc
(c)
infer.py:37
↓ 1 callers
Function
is_punc
(c)
infer_utils.py:157
↓ 1 callers
Function
load_tf_weights_in_bert
Load tf checkpoints in a pytorch model
modeling.py:67
↓ 1 callers
Method
predict
(self, contenxt, question, prev_ques, prev_answ)
infer.py:102
↓ 1 callers
Function
str_to_coqa_example
(contenxt, question, prev_ques, prev_answ)
infer.py:60
↓ 1 callers
Method
to_dict
Serializes this instance to a Python dictionary.
modeling.py:229
↓ 1 callers
Function
write_predictions
Write final predictions to the json file and log-odds of null if needed.
infer_utils.py:571
Method
__init__
(self, model_path, lower_case = True)
infer.py:95
Method
__init__
(self, qas_id, question_text, doc_tokens, orig_answer_text=None, start_position=None,
infer_utils.py:36
Method
__init__
(self, unique_id, example_index, doc_span_index, tokens, token_to_orig_map, token_is_m
infer_utils.py:93
Method
__init__
Constructs BertConfig. Args: vocab_size_or_config_json_file: Vocabulary size of `inputs_ids` in `BertModel`. hidden_s
modeling.py:153
Method
__init__
Construct a layernorm module in the TF style (epsilon inside the square root).
modeling.py:248
Method
__init__
(self, config)
modeling.py:265
Method
__init__
(self, config)
modeling.py:294
Method
__init__
(self, config)
modeling.py:345
Method
__init__
(self, config)
modeling.py:359
Method
__init__
(self, config)
modeling.py:371
Method
__init__
(self, config)
modeling.py:386
Method
__init__
(self, config)
modeling.py:414
Method
__init__
(self, config)
modeling.py:431
Method
__init__
(self, config)
modeling.py:446
Method
__init__
(self, config, bert_model_embedding_weights)
modeling.py:463
Method
__init__
(self, config, bert_model_embedding_weights)
modeling.py:482
Method
__init__
(self, config)
modeling.py:492
Method
__init__
(self, config, bert_model_embedding_weights)
modeling.py:502
Method
__init__
(self, config, *inputs, **kwargs)
modeling.py:517
Method
__init__
(self, config)
modeling.py:712
Method
__init__
(self, config)
modeling.py:801
Method
__init__
(self, config)
modeling.py:864
Method
__init__
(self, config)
modeling.py:926
Method
__init__
(self, config, num_labels)
modeling.py:990
Method
__init__
(self, config, num_choices)
modeling.py:1055
Method
__init__
(self, config, num_labels)
modeling.py:1125
Method
__init__
(self, config)
modeling.py:1200
Method
__repr__
(self)
modeling.py:226
Method
__str__
(self)
infer_utils.py:62
Function
_get_best_indexes
Get the n-best logits from a list.
infer_utils.py:891
Function
chat
(bot_id)
server.py:23
Function
create_bot
()
server.py:41
Method
forward
(self, x)
modeling.py:256
Method
forward
(self, input_ids, token_type_ids=None)
modeling.py:276
Method
forward
(self, hidden_states, attention_mask)
modeling.py:315
Method
forward
(self, hidden_states, input_tensor)
modeling.py:351
Method
forward
(self, input_tensor, attention_mask)
modeling.py:364
Method
forward
(self, hidden_states)
modeling.py:379
Method
forward
(self, hidden_states, input_tensor)
modeling.py:392
Method
forward
(self, hidden_states, attention_mask)
modeling.py:406
Method
forward
(self, hidden_states, attention_mask, output_all_encoded_layers=True)
modeling.py:419
Method
forward
(self, hidden_states)
modeling.py:436
Method
forward
(self, hidden_states)
modeling.py:455
Method
forward
(self, hidden_states)
modeling.py:475
Method
forward
(self, sequence_output)
modeling.py:486
Method
forward
(self, pooled_output)
modeling.py:496
Method
forward
(self, sequence_output, pooled_output)
modeling.py:507
Method
forward
(self, input_ids, token_type_ids=None, attention_mask=None, output_all_encoded_layers=True)
modeling.py:719
Method
forward
(self, input_ids, token_type_ids=None, attention_mask=None, masked_lm_labels=None, next_sentence_label=None)
modeling.py:807
Method
forward
(self, input_ids, token_type_ids=None, attention_mask=None, masked_lm_labels=None)
modeling.py:870
Method
forward
(self, input_ids, token_type_ids=None, attention_mask=None, next_sentence_label=None)
modeling.py:932
Method
forward
(self, input_ids, token_type_ids=None, attention_mask=None, labels=None)
modeling.py:998
Method
forward
(self, input_ids, token_type_ids=None, attention_mask=None, labels=None)
modeling.py:1063
Method
forward
(self, input_ids, token_type_ids=None, attention_mask=None, labels=None)
modeling.py:1133
Method
forward
(self, input_ids, token_type_ids=None, attention_mask=None, start_positions=None, end_positions=None)
modeling.py:1212
Function
gelu
Implementation of the gelu activation function. For information: OpenAI GPT's gelu is slightly different (and gives slightly different results
modeling.py:134
Function
home
()
server.py:19
Function
id_generator
(size=4, chars=string.ascii_lowercase)
server.py:8
Method
init_bert_weights
Initialize the weights.
modeling.py:528
Function
punc_sep
(s)
infer.py:42
Function
punc_sep
(s)
infer_utils.py:162
Function
read_coqa_examples
Read a SQuAD json file into a list of SquadExample.
infer_utils.py:147
Function
serve_static
(filename)
server.py:14
Function
swish
(x)
modeling.py:143
Method
to_json_file
Save this instance to a json file.
modeling.py:238