dragxd commited on
Commit
de6fa74
·
verified ·
1 Parent(s): 982c60f

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -0
app.py ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import subprocess
3
+
4
+ def run_mikobot():
5
+ # Run the Mikobot command
6
+ try:
7
+ # Capture the output of the command
8
+ result = subprocess.run(['python3', '-m', 'Mikobot'], capture_output=True, text=True, check=True)
9
+ return result.stdout # Return the standard output
10
+ except subprocess.CalledProcessError as e:
11
+ return f"Error: {e.stderr}" # Return the error output if the command fails
12
+
13
+ # Streamlit UI
14
+ st.title("Mikobot Runner")
15
+
16
+ if st.button("Run Flash"):
17
+ output = run_mikobot()
18
+ st.text_area("Output", output, height=300) # Display the output in a text area