curry tang commited on
Commit
27f9613
·
1 Parent(s): dce0dbb
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -229,15 +229,15 @@ with gr.Blocks() as app:
229
  with gr.Accordion('代码助手', open=True):
230
  code_type = gr.Dropdown(
231
  label='代码类型',
232
- choices=['Javascript', 'Typescript', 'Python', 'C++', 'PHP', 'Java'],
233
  value='Javascript',
234
  )
235
  code = gr.Textbox(label='代码', lines=10, value=None)
236
  with gr.Row(variant='panel'):
 
237
  explain_code_btn = gr.Button('解释代码')
238
  optimize_code_btn = gr.Button('优化代码')
239
  debug_code_btn = gr.Button('错误修复')
240
- function_gen_btn = gr.Button('函数生成')
241
  explain_code_btn.click(fn=explain_code, inputs=[code_type, code, chat_engine], outputs=[code_result])
242
  optimize_code_btn.click(fn=optimize_code, inputs=[code_type, code, chat_engine], outputs=[code_result])
243
  debug_code_btn.click(fn=debug_code, inputs=[code_type, code, chat_engine], outputs=[code_result])
 
229
  with gr.Accordion('代码助手', open=True):
230
  code_type = gr.Dropdown(
231
  label='代码类型',
232
+ choices=['Javascript', 'Typescript', 'Python', "GO", 'C++', 'PHP', 'Java', 'C#', "C", "Kotlin", "Bash"],
233
  value='Javascript',
234
  )
235
  code = gr.Textbox(label='代码', lines=10, value=None)
236
  with gr.Row(variant='panel'):
237
+ function_gen_btn = gr.Button('代码生成', variant='primary')
238
  explain_code_btn = gr.Button('解释代码')
239
  optimize_code_btn = gr.Button('优化代码')
240
  debug_code_btn = gr.Button('错误修复')
 
241
  explain_code_btn.click(fn=explain_code, inputs=[code_type, code, chat_engine], outputs=[code_result])
242
  optimize_code_btn.click(fn=optimize_code, inputs=[code_type, code, chat_engine], outputs=[code_result])
243
  debug_code_btn.click(fn=debug_code, inputs=[code_type, code, chat_engine], outputs=[code_result])