loubnabnl HF Staff commited on
Commit
2e0d512
·
1 Parent(s): 9a8c730

update app

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -3,9 +3,9 @@ from transformers import AutoTokenizer, AutoModelForCausalLM, set_seed
3
  from transformers import pipeline
4
 
5
 
6
- title = "CodeParrot Generator 🦜"
7
  description = "This is a subspace to make code generation with CodeParrot, it is used in a larger space for model comparison."
8
- examples = "def print_hello_world():\n \"""Print 'Hello world' \""" "
9
  tokenizer = load_tokenizer("lvwerra/codeparrot")
10
  model = load_model("lvwerra/codeparrot")
11
 
@@ -45,7 +45,7 @@ interface = gr.Interface(
45
  )
46
  ],
47
  outputs=gr.Textbox(label="Predicted code", lines=10)),
48
- examples=examples,
49
  layout="horizontal",
50
  theme="peach",
51
  description=description,
 
3
  from transformers import pipeline
4
 
5
 
6
+ title = "CodeParrot Generator"
7
  description = "This is a subspace to make code generation with CodeParrot, it is used in a larger space for model comparison."
8
+ example = "def print_hello_world():\n \"""Print 'Hello world' \""" "
9
  tokenizer = load_tokenizer("lvwerra/codeparrot")
10
  model = load_model("lvwerra/codeparrot")
11
 
 
45
  )
46
  ],
47
  outputs=gr.Textbox(label="Predicted code", lines=10)),
48
+ examples=example,
49
  layout="horizontal",
50
  theme="peach",
51
  description=description,