efayguo commited on
Commit
8231377
·
verified ·
1 Parent(s): 26b90bf

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -15,18 +15,18 @@ def run(assignment):
15
 
16
  if assignment:
17
 
18
- gr.Info(f"Start processing: {assignment}... you many need to wait up to 30 seconds / 开始任务: {assignment}... 你可能要等待30秒", duration=30)
19
 
20
  result= Coder().crew().kickoff(inputs=inputs)
21
  output = result.raw
22
  return output
23
  else:
24
- gr.Warning("Please input your task / 请填写任务", duration=5)
25
 
26
 
27
 
28
  # Build the UI
29
- with gr.Blocks(theme="soft") as ui:
30
  gr.Markdown(
31
  """
32
  # 👨‍💻 Python Coder by Efay Guo
@@ -39,7 +39,7 @@ with gr.Blocks(theme="soft") as ui:
39
 
40
 
41
  query_textbox = gr.Textbox(label="What code would you like to write? / 您想实现什么代码功能?", placeholder="write a a beautifulsoup micro service or 写一个flask微服务框架")
42
- run_button = gr.Button("Start Writing Code / 开始写代码", variant="huggingface")
43
  report = gr.Markdown(label="Report")
44
 
45
  run_button.click(fn=run, inputs=query_textbox, outputs=report, show_progress="full")
 
15
 
16
  if assignment:
17
 
18
+ gr.Warning(f"Start processing... you many need to wait up to 30 seconds / 开始任务... 你可能要等待30秒", duration=30)
19
 
20
  result= Coder().crew().kickoff(inputs=inputs)
21
  output = result.raw
22
  return output
23
  else:
24
+ gr.Warning("Please input your task / 请填写任务", duration=3)
25
 
26
 
27
 
28
  # Build the UI
29
+ with gr.Blocks(theme="gstaff/sketch") as ui:
30
  gr.Markdown(
31
  """
32
  # 👨‍💻 Python Coder by Efay Guo
 
39
 
40
 
41
  query_textbox = gr.Textbox(label="What code would you like to write? / 您想实现什么代码功能?", placeholder="write a a beautifulsoup micro service or 写一个flask微服务框架")
42
+ run_button = gr.Button("Start Writing Code / 开始写代码")
43
  report = gr.Markdown(label="Report")
44
 
45
  run_button.click(fn=run, inputs=query_textbox, outputs=report, show_progress="full")