朱东升 commited on
Commit
5922648
·
1 Parent(s): 73850c8
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -504,7 +504,10 @@ with gr.Blocks(title="代码评估服务", theme=gr.themes.Soft()) as demo:
504
  """)
505
 
506
  # 添加API端点
507
- demo.launch(api_name="predict")
 
 
 
508
 
509
  if __name__ == "__main__":
510
  demo.queue()
 
504
  """)
505
 
506
  # 添加API端点
507
+ with gr.Row(visible=False):
508
+ api_input = gr.JSON()
509
+ api_output = gr.JSON()
510
+ api_input.change(fn=evaluate, inputs=api_input, outputs=api_output)
511
 
512
  if __name__ == "__main__":
513
  demo.queue()