Update app.py
Browse files
app.py
CHANGED
@@ -49,17 +49,17 @@ def run_command(command):
|
|
49 |
st.error(f"An error occurred: {e}")
|
50 |
|
51 |
# Layout with columns
|
52 |
-
col1, col2 = st.columns([
|
53 |
|
54 |
-
# Command history display in the
|
55 |
-
with
|
56 |
st.subheader("Command History")
|
57 |
for cmd in reversed(st.session_state.history):
|
58 |
if st.button(f"Run: {cmd}", key=cmd):
|
59 |
run_command(cmd)
|
60 |
|
61 |
-
# Command input and button in the
|
62 |
-
with
|
63 |
command = st.text_area("Enter terminal command", placeholder="e.g., ls, pwd, echo 'Hello World'", height=100)
|
64 |
if st.button("Run Command"):
|
65 |
if command:
|
|
|
49 |
st.error(f"An error occurred: {e}")
|
50 |
|
51 |
# Layout with columns
|
52 |
+
col1, col2 = st.columns([2, 1])
|
53 |
|
54 |
+
# Command history display in the second column
|
55 |
+
with col2:
|
56 |
st.subheader("Command History")
|
57 |
for cmd in reversed(st.session_state.history):
|
58 |
if st.button(f"Run: {cmd}", key=cmd):
|
59 |
run_command(cmd)
|
60 |
|
61 |
+
# Command input and button in the first column
|
62 |
+
with col1:
|
63 |
command = st.text_area("Enter terminal command", placeholder="e.g., ls, pwd, echo 'Hello World'", height=100)
|
64 |
if st.button("Run Command"):
|
65 |
if command:
|