Spaces:
Runtime error
Runtime error
Commit
·
fbe1c0d
1
Parent(s):
00f2956
error fix
Browse files
app.py
CHANGED
@@ -43,12 +43,12 @@ def post(jsn):
|
|
43 |
|
44 |
def get_script(lang, instruction):
|
45 |
jsn = {"inputs": comment_syntaxes[lang].format("Instruction: " + instruction.replace(
|
46 |
-
'\n', '')) + '\n' + comment_syntaxes[lang].format("Code:") + '\n'
|
47 |
return post(jsn)
|
48 |
|
49 |
|
50 |
def feedback(opt):
|
51 |
-
return post({"inputs": opt}
|
52 |
|
53 |
|
54 |
demo = gr.Blocks()
|
@@ -64,7 +64,7 @@ with demo:
|
|
64 |
choices=list(comment_syntaxes.keys()), label="Choose the language")
|
65 |
|
66 |
# with gr.Column:
|
67 |
-
instruction = gr.Textbox(label="Write
|
68 |
value="Create a python function that generates random password with given length using ascii characters ", lines=6)
|
69 |
|
70 |
with gr.Row():
|
|
|
43 |
|
44 |
def get_script(lang, instruction):
|
45 |
jsn = {"inputs": comment_syntaxes[lang].format("Instruction: " + instruction.replace(
|
46 |
+
'\n', '')) + '\n' + comment_syntaxes[lang].format("Code:") + '\n', **jsn_trail}
|
47 |
return post(jsn)
|
48 |
|
49 |
|
50 |
def feedback(opt):
|
51 |
+
return post({"inputs": opt}, **jsn_trail)
|
52 |
|
53 |
|
54 |
demo = gr.Blocks()
|
|
|
64 |
choices=list(comment_syntaxes.keys()), label="Choose the language")
|
65 |
|
66 |
# with gr.Column:
|
67 |
+
instruction = gr.Textbox(label="Write an instruction",
|
68 |
value="Create a python function that generates random password with given length using ascii characters ", lines=6)
|
69 |
|
70 |
with gr.Row():
|