Skip to content

Latest commit

 

History

History
46 lines (40 loc) · 971 Bytes

readme.md

File metadata and controls

46 lines (40 loc) · 971 Bytes

Learning Project

PHP Code Completion via Pre-trained AI () huggingface/CodeBERTa-small-v1)

Installation

pip install torch torchvision transformers
echo "FLASK_APP=main.py" > .ev
flask run

Make HTTP GET Request: http://127.0.0.1:5000/public function htmlRender()<mask>

Outputs:

[
    {
        "score": 0.5711319446563721,
        "token_str": " {",
        "sequence": "public function htmlRender() {"
    },
    {
        "score": 0.09826863557100296,
        "token_str": "\n",
        "sequence": "public function htmlRender()\n"
    },
    {
        "score": 0.09666424244642258,
        "token_str": "\r\n",
        "sequence": "public function htmlRender()\r\n"
    },
    {
        "score": 0.0958096981048584,
        "token_str": "   ",
        "sequence": "public function htmlRender()   "
    },
    {
        "score": 0.015471425838768482,
        "token_str": "\t",
        "sequence": "public function htmlRender()\t"
    }
]