codet5p_220m_py_sum / README.md
Paul-B98
fix readme
07821a7 unverified
metadata
language:
  - en
license: mit
datasets:
  - code_x_glue_ct_code_to_text
metrics:
  - bleu
  - sacrebleu

Codet5+ 220m Py Sum

This Model is based on the CodeT5+ (220m) from salesforce and was finetuned for the code summarization task by using the XCodeGlue Dataset. The Code is accessible on Github.

Results

Example on how to use

The model can be easily download from Huggingface and used in a summarization pipeline.

from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline

pipeline = SummarizationPipeline(
    model=AutoModelWithLMHead.from_pretrained("Paul-B98/codet5p_220m_py_sum"),
    tokenizer=AutoTokenizer.from_pretrained("Salesforce/codet5p-220m"),
    device=0
)

example_method = """
def greet(name):
    print(f"Hello, {name}!")
"""

pipeline([example_method])[0]["summary_text"]