Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -15,18 +15,18 @@ def run(assignment):
|
|
| 15 |
|
| 16 |
if assignment:
|
| 17 |
|
| 18 |
-
gr.
|
| 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=
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
# Build the UI
|
| 29 |
-
with gr.Blocks(theme="
|
| 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 / 开始写代码"
|
| 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")
|