Spaces:
Runtime error
Runtime error
Merge branch 'main' of https://huggingface.co/spaces/abdulmeLINK/programmer-bloom
Browse files
app.py
CHANGED
@@ -38,7 +38,7 @@ jsn_trail = {"parameters":
|
|
38 |
|
39 |
def post(jsn):
|
40 |
response = requests.post(API_URL, headers=headers, json=jsn)
|
41 |
-
return response.json()["generated_text"]
|
42 |
|
43 |
|
44 |
def get_script(lang, instruction):
|
@@ -61,7 +61,7 @@ with demo:
|
|
61 |
with gr.Row():
|
62 |
|
63 |
dropdown = gr.Dropdown(
|
64 |
-
choices=comment_syntaxes.keys(), label="Choose the language")
|
65 |
|
66 |
# with gr.Column:
|
67 |
instruction = gr.Textbox(label="Write a instruction",
|
|
|
38 |
|
39 |
def post(jsn):
|
40 |
response = requests.post(API_URL, headers=headers, json=jsn)
|
41 |
+
return response.json()[0]["generated_text"]
|
42 |
|
43 |
|
44 |
def get_script(lang, instruction):
|
|
|
61 |
with gr.Row():
|
62 |
|
63 |
dropdown = gr.Dropdown(
|
64 |
+
choices=list(comment_syntaxes.keys()), label="Choose the language")
|
65 |
|
66 |
# with gr.Column:
|
67 |
instruction = gr.Textbox(label="Write a instruction",
|