Ahsen Khaliq commited on
Commit
713592f
1 Parent(s): 5441554

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -0
app.py ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ title = "CodeT5"
3
+ description = "Gradio Demo for CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generation. To use it, simply add your text, or click one of the examples to load them. Read more at the links below."
4
+ article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2109.00859'>CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generation</a> | <a href='https://github.com/salesforce/CodeT5'>CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generation</a></p>"
5
+ examples = [
6
+ ["def greet(user): print(f'hello <extra_id_0>!') </s>"]
7
+ ]
8
+ gr.Interface.load("huggingface/Salesforce/codet5-base", inputs=gr.inputs.Textbox(lines=5, label="Input Text"),title=title,description=description,article=article, examples=examples).launch()