from autocomplete.gpt2_coder import GPT2Coder
m = GPT2Coder("shibing624/code-autocomplete-distilgpt2-python")
print(m.generate('import torch.nn as')[0])
Also, use huggingface/transformers:
Please use 'GPT2' related functions to load this model!
Pretrained model on English language using a causal language modeling (CLM) objective. It was introduced in
this paper
and first released at
this page
.
Disclaimer: The team releasing GPT-2 also wrote a
model card
for their model. Content from this model card
has been written by the Hugging Face team to complete the information they provided and give specific examples of bias.
Citation
@misc{code-autocomplete,
author = {Xu Ming},
title = {code-autocomplete: Code AutoComplete with GPT model},
year = {2022},
publisher = {GitHub},
journal = {GitHub repository},
url = {https://github.com/shibing624/code-autocomplete},
}
Runs of shibing624 code-autocomplete-distilgpt2-python on huggingface.co
44
Total runs
0
24-hour runs
-2
3-day runs
2
7-day runs
-6
30-day runs
More Information About code-autocomplete-distilgpt2-python huggingface.co Model
More code-autocomplete-distilgpt2-python license Visit here:
code-autocomplete-distilgpt2-python huggingface.co is an AI model on huggingface.co that provides code-autocomplete-distilgpt2-python's model effect (), which can be used instantly with this shibing624 code-autocomplete-distilgpt2-python model. huggingface.co supports a free trial of the code-autocomplete-distilgpt2-python model, and also provides paid use of the code-autocomplete-distilgpt2-python. Support call code-autocomplete-distilgpt2-python model through api, including Node.js, Python, http.
code-autocomplete-distilgpt2-python huggingface.co is an online trial and call api platform, which integrates code-autocomplete-distilgpt2-python's modeling effects, including api services, and provides a free online trial of code-autocomplete-distilgpt2-python, you can try code-autocomplete-distilgpt2-python online for free by clicking the link below.
shibing624 code-autocomplete-distilgpt2-python online free url in huggingface.co:
code-autocomplete-distilgpt2-python is an open source model from GitHub that offers a free installation service, and any user can find code-autocomplete-distilgpt2-python on GitHub to install. At the same time, huggingface.co provides the effect of code-autocomplete-distilgpt2-python install, users can directly use code-autocomplete-distilgpt2-python installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
code-autocomplete-distilgpt2-python install url in huggingface.co: