ruslanmv commited on
Commit
67c3aaa
·
verified ·
1 Parent(s): 5019d7b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -203,10 +203,12 @@ with gr.Blocks(
203
  command_cmd = gr.Textbox(label="Command", placeholder="Enter a command")
204
  with gr.Column(scale=1, min_width=BUTTON_MIN_WIDTH):
205
  btn_cmd = gr.Button("Run Command")
206
- output_cmd = gr.Textbox(label="Command Output", value="")
 
207
  def on_button_click():
208
- output_cmd.value = run_command(command_cmd.value)
209
- btn_cmd.click(on_button_click)
 
210
 
211
 
212
  if __name__ == "__main__":
 
203
  command_cmd = gr.Textbox(label="Command", placeholder="Enter a command")
204
  with gr.Column(scale=1, min_width=BUTTON_MIN_WIDTH):
205
  btn_cmd = gr.Button("Run Command")
206
+ output_cmd = gr.Label("", label="Command Output") # Use gr.Label for simple text output
207
+
208
  def on_button_click():
209
+ output_cmd.value = run_command(command_cmd.value) # Update value directly
210
+
211
+ btn_cmd.click(on_button_click)
212
 
213
 
214
  if __name__ == "__main__":