Spaces:
Runtime error
Runtime error
update app
Browse files
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 |
-
|
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=
|
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,
|