Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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.
|
|
|
|
| 207 |
def on_button_click():
|
| 208 |
-
output_cmd.value = run_command(command_cmd.value)
|
| 209 |
-
|
|
|
|
| 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__":
|