File size: 624 Bytes
69c2c91 de6fa74 69c2c91 de6fa74 69c2c91 de6fa74 69c2c91 de6fa74 5897f28 69c2c91 de6fa74 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
import streamlit as st
import subprocess
def run_mikobot():
# Run the Mikobot command
try:
# Capture the output of the command
result = subprocess.run(['python3', '-m', 'Mikobot'], capture_output=True, text=True, check=True)
return result.stdout # Return the standard output
except subprocess.CalledProcessError as e:
return f"Error: {e.stderr}" # Return the error output if the command fails
# Streamlit UI
st.title("Mikobot Runner")
if st.button("Run Mikobot"):
output = run_mikobot()
st.text_area("Output", output, height=300) # Display the output in a text area |