Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -199,18 +199,15 @@ with gr.Blocks(
|
|
| 199 |
|
| 200 |
with gr.Tab("Command Viewer"):
|
| 201 |
with gr.Row():
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
on_button_click()
|
| 212 |
-
command_cmd.keypress(on_enter_key) # Add event listener for Enter keypress
|
| 213 |
-
btn_cmd.click(on_button_click)
|
| 214 |
|
| 215 |
|
| 216 |
if __name__ == "__main__":
|
|
|
|
| 199 |
|
| 200 |
with gr.Tab("Command Viewer"):
|
| 201 |
with gr.Row():
|
| 202 |
+
input_cmd = gr.Textbox(label="Command", placeholder="Enter a command")
|
| 203 |
+
output_cmd = gr.Label("", label="Command Output")
|
| 204 |
+
btn_cmd = gr.Button("Run Command")
|
| 205 |
+
|
| 206 |
+
btn_cmd.click(fn=run_command,
|
| 207 |
+
inputs=[input_cmd.value],
|
| 208 |
+
outputs=[output_cmd.text])
|
| 209 |
+
|
| 210 |
+
|
|
|
|
|
|
|
|
|
|
| 211 |
|
| 212 |
|
| 213 |
if __name__ == "__main__":
|