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 |