Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -7,9 +7,10 @@ EXAMPLE_0 = "#!/bin/bash\n# This script removes files larger than 2MB in the cur
|
|
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 |
|
|
|
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 |
+
EXAMPLE_5 = """#!/bin/bash\n\n# This script check if the arg passed as first arg is a founder of huggingface\nfounders_array=("julien" "thom" "clem")"""
|
11 |
|
12 |
|
13 |
+
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], [EXAMPLE_5, 70, 0.6, 43]]
|
14 |
tokenizer = AutoTokenizer.from_pretrained("mrm8488/santacoder-finetuned-the-stack-bash-4")
|
15 |
model = AutoModelForCausalLM.from_pretrained("mrm8488/santacoder-finetuned-the-stack-bash-4", trust_remote_code=True).to("cuda")
|
16 |
|