abdulmeLINK commited on
Commit
00f2956
·
2 Parent(s): 9152c8d 88876d7

Merge branch 'main' of https://huggingface.co/spaces/abdulmeLINK/programmer-bloom

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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",