Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
|
7 |
title = "Santacoder bash/shell Completion π
"
|
8 |
description = "This is a subspace to make code generation with [SantaCoder fine-tuned on The Stack bash/shell](https://huggingface.co/mrm8488/santacoder-finetuned-the-stack-bash-4)"
|
9 |
EXAMPLE_0 = "#!/bin/bash\n# This script read the files in the current dir and remove it if greater than 2MB"
|
10 |
-
|
11 |
[EXAMPLE_0, 128, 0.6, 42]]
|
12 |
tokenizer = AutoTokenizer.from_pretrained("mrm8488/santacoder-finetuned-the-stack-bash-4")
|
13 |
model = AutoModelForCausalLM.from_pretrained("mrm8488/santacoder-finetuned-the-stack-bash-4", trust_remote_code=True).to(device)
|
@@ -47,7 +47,7 @@ iface = gr.Interface(
|
|
47 |
)
|
48 |
],
|
49 |
outputs=gr.Textbox(label="Predicted code", lines=10),
|
50 |
-
examples=
|
51 |
layout="horizontal",
|
52 |
theme="peach",
|
53 |
description=description,
|
|
|
7 |
title = "Santacoder bash/shell Completion π
"
|
8 |
description = "This is a subspace to make code generation with [SantaCoder fine-tuned on The Stack bash/shell](https://huggingface.co/mrm8488/santacoder-finetuned-the-stack-bash-4)"
|
9 |
EXAMPLE_0 = "#!/bin/bash\n# This script read the files in the current dir and remove it if greater than 2MB"
|
10 |
+
examples = [
|
11 |
[EXAMPLE_0, 128, 0.6, 42]]
|
12 |
tokenizer = AutoTokenizer.from_pretrained("mrm8488/santacoder-finetuned-the-stack-bash-4")
|
13 |
model = AutoModelForCausalLM.from_pretrained("mrm8488/santacoder-finetuned-the-stack-bash-4", trust_remote_code=True).to(device)
|
|
|
47 |
)
|
48 |
],
|
49 |
outputs=gr.Textbox(label="Predicted code", lines=10),
|
50 |
+
examples=examples,
|
51 |
layout="horizontal",
|
52 |
theme="peach",
|
53 |
description=description,
|