HHousen / lecture2notes

Keyword argument defined before variable positional arguments PYL-W1113
Anti-pattern
Major
3 years ago4 years old
Keyword argument before variable positional arguments list in the definition of initialize_abstractive_model function
 682    return final_sentences
 683
 684
 685def initialize_abstractive_model(sum_model, use_hf_pipeline=True, *args, **kwargs): 686    logger.debug("Loading " + sum_model + " model")
 687    if use_hf_pipeline:
 688        if sum_model == "bart":
Keyword argument before variable positional arguments list in the definition of generic_abstractive_hf_api function
 704    return SUMMARIZER
 705
 706
 707def generic_abstractive_hf_api( 708    to_summarize, summarizer="facebook/bart-large-cnn", *args, **kwargs
 709):
 710    api_url = "https://api-inference.huggingface.co/models/" + summarizer
Keyword argument before variable positional arguments list in the definition of generic_abstractive function
 729    return response_json
 730
 731
 732def generic_abstractive( 733    to_summarize,
 734    summarizer=None,
 735    min_length=None,
Keyword argument before variable positional arguments list in the definition of structured_joined_sum function
 848    raise Exception("OpenAI API failed to summarize. Please try again later.")
 849
 850
 851def structured_joined_sum( 852    ssa_path,
 853    transcript_json_path,
 854    frame_every_x=1,