oucgc1996 commited on
Commit
a1842a4
·
verified ·
1 Parent(s): a2398af

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -145,7 +145,6 @@ def CTXGen(τ, g_num, length_range):
145
 
146
  # 使用 gr.Blocks 构建界面
147
  with gr.Blocks() as demo:
148
- gr.Markdown("# Conotoxin Generation")
149
  with gr.Row():
150
  τ = gr.Slider(minimum=1, maximum=2, step=0.1, label="τ")
151
  g_num = gr.Dropdown(choices=[1, 10, 100], label="Number of generations")
@@ -155,13 +154,12 @@ with gr.Blocks() as demo:
155
  stop_button = gr.Button("Stop Generation")
156
  with gr.Row():
157
  output_df = gr.DataFrame(label="Generated Conotoxins")
158
- status_text = gr.Textbox(label="Status")
159
  with gr.Row():
160
  output_file = gr.File(label="Download generated conotoxins")
161
 
162
  # 绑定事件
163
- start_button.click(CTXGen, inputs=[τ, g_num, length_range], outputs=[output_df, status_text])
164
- stop_button.click(stop_generation, outputs=status_text)
165
 
166
  # 启动 Gradio 应用
167
  demo.launch()
 
145
 
146
  # 使用 gr.Blocks 构建界面
147
  with gr.Blocks() as demo:
 
148
  with gr.Row():
149
  τ = gr.Slider(minimum=1, maximum=2, step=0.1, label="τ")
150
  g_num = gr.Dropdown(choices=[1, 10, 100], label="Number of generations")
 
154
  stop_button = gr.Button("Stop Generation")
155
  with gr.Row():
156
  output_df = gr.DataFrame(label="Generated Conotoxins")
 
157
  with gr.Row():
158
  output_file = gr.File(label="Download generated conotoxins")
159
 
160
  # 绑定事件
161
+ start_button.click(CTXGen, inputs=[τ, g_num, length_range], outputs=[output_df,output_file])
162
+ stop_button.click(stop_generation, outputs=output_file)
163
 
164
  # 启动 Gradio 应用
165
  demo.launch()