gursi26 commited on
Commit
d76525d
1 Parent(s): ff0ef88
Files changed (2) hide show
  1. app.py +40 -2
  2. requirements.txt +4 -0
app.py CHANGED
@@ -1,5 +1,43 @@
1
  import streamlit as st
2
 
3
- x = st.slider('Select a value')
4
- st.write(x, 'squared is', x * x)
5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import streamlit as st
2
 
3
+ st.title("MyCobot280 Pi control demo")
 
4
 
5
+ st.markdown("""
6
+ This app is a public demo of ...
7
+ """)
8
+
9
+ with st.form("mqtt_form"):
10
+ commands = [
11
+ "get-angles",
12
+ "get-coords",
13
+ "get-gripper-value",
14
+ "get-camera",
15
+ "send-angles",
16
+ "send-coords",
17
+ "send-gripper-value"
18
+ ]
19
+ selected = st.selectbox("Select command: ", commands)
20
+
21
+ if selected == "get-angles":
22
+ if st.form_submit_button("Get Angles"):
23
+ # Add the logic to get angles
24
+ st.write("Executing Get Angles command...")
25
+ elif selected == "get-coords":
26
+ if st.form_submit_button("Get Coords"):
27
+ # Add the logic to get coordinates
28
+ st.write("Executing Get Coords command...")
29
+ elif selected == "get-gripper-value":
30
+ if st.form_submit_button("Get Gripper Value"):
31
+ # Add the logic to get gripper value
32
+ st.write("Executing Get Gripper Value command...")
33
+ elif selected == "get-camera":
34
+ image_quality = st.slider("Select Image Quality", 1, 100, 50)
35
+ if st.form_submit_button("Get Camera"):
36
+ # Add the logic to get camera feed
37
+ st.write(f"Executing Get Camera command with image quality: {image_quality}")
38
+ elif selected == "send-angles":
39
+ pass
40
+ elif selected == "send-coords":
41
+ pass
42
+ elif selected == "send-gripper-value":
43
+ pass
requirements.txt CHANGED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ paho-mqtt==2.1.0
2
+ pillow==10.4.0
3
+ setuptools==75.1.0
4
+ wheel==0.44.0