Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -6,9 +6,10 @@ description = "This is a subspace to make code generation with [SantaCoder fine-
|
|
6 |
EXAMPLE_0 = "#!/bin/bash\n# This script removes files larger than 2MB in the current folder\nfind ."
|
7 |
EXAMPLE_1 = "#!/bin/bash\n\n# This script send an email\nto=”[email protected]”\nsubject=”Greeting”\nmsg=”Welcome to our site”\n"
|
8 |
EXAMPLE_3 = "#!/bin/bash\n# This script convert avi files to mp4\nfor filename in $(ls *.avi); do\n"
|
9 |
-
EXAMPLE_4 = "#!/bin/bash\nsource=$1\ndest=$2\n"
|
10 |
|
11 |
-
|
|
|
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("cuda")
|
14 |
|
|
|
6 |
EXAMPLE_0 = "#!/bin/bash\n# This script removes files larger than 2MB in the current folder\nfind ."
|
7 |
EXAMPLE_1 = "#!/bin/bash\n\n# This script send an email\nto=”[email protected]”\nsubject=”Greeting”\nmsg=”Welcome to our site”\n"
|
8 |
EXAMPLE_3 = "#!/bin/bash\n# This script convert avi files to mp4\nfor filename in $(ls *.avi); do\n"
|
9 |
+
EXAMPLE_4 = "#!/bin/bash\nsource=$1\ndest=$2\n# copy source on dest\n"
|
10 |
|
11 |
+
|
12 |
+
examples = [[EXAMPLE_0, 14, 0.6, 42], [EXAMPLE_1, 28, 0.6, 42], [EXAMPLE_3, 46, 0.6, 42], [EXAMPLE_4, 35, 0.6, 43]]
|
13 |
tokenizer = AutoTokenizer.from_pretrained("mrm8488/santacoder-finetuned-the-stack-bash-4")
|
14 |
model = AutoModelForCausalLM.from_pretrained("mrm8488/santacoder-finetuned-the-stack-bash-4", trust_remote_code=True).to("cuda")
|
15 |
|