Ahilan Kumaresan
commited on
Commit
·
fcd543a
1
Parent(s):
913a450
update to verify functions
Browse files- ModularedPresentation.ipynb +0 -0
- app.py +21 -11
- functions.py +1 -2
ModularedPresentation.ipynb
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|
app.py
CHANGED
|
@@ -1,15 +1,4 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
-
import numpy as np
|
| 3 |
-
import matplotlib.pyplot as plt
|
| 4 |
-
import mediapipe as mp
|
| 5 |
-
import cv2
|
| 6 |
-
import math
|
| 7 |
-
import time
|
| 8 |
-
import plotly.graph_objects as go
|
| 9 |
-
from plotly.subplots import make_subplots
|
| 10 |
-
|
| 11 |
-
# Import physics engine
|
| 12 |
-
import functions as f
|
| 13 |
|
| 14 |
# ==========================================
|
| 15 |
# 0. PAGE CONFIGURATION & STYLING
|
|
@@ -21,6 +10,27 @@ st.set_page_config(
|
|
| 21 |
initial_sidebar_state="expanded"
|
| 22 |
)
|
| 23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
|
| 25 |
# ==========================================
|
| 26 |
# 0. SESSION STATE (for camera flow)
|
|
|
|
| 1 |
import streamlit as st
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
# ==========================================
|
| 4 |
# 0. PAGE CONFIGURATION & STYLING
|
|
|
|
| 10 |
initial_sidebar_state="expanded"
|
| 11 |
)
|
| 12 |
|
| 13 |
+
import numpy as np
|
| 14 |
+
import matplotlib.pyplot as plt
|
| 15 |
+
import math
|
| 16 |
+
import time
|
| 17 |
+
|
| 18 |
+
try:
|
| 19 |
+
import mediapipe as mp
|
| 20 |
+
import cv2
|
| 21 |
+
import plotly.graph_objects as go
|
| 22 |
+
from plotly.subplots import make_subplots
|
| 23 |
+
except ImportError as e:
|
| 24 |
+
st.error(f"CRITICAL ERROR: Failed to import required libraries. {e}")
|
| 25 |
+
st.stop()
|
| 26 |
+
|
| 27 |
+
# Import physics engine
|
| 28 |
+
try:
|
| 29 |
+
import functions as f
|
| 30 |
+
except ImportError as e:
|
| 31 |
+
st.error(f"CRITICAL ERROR: Failed to import physics engine. {e}")
|
| 32 |
+
st.stop()
|
| 33 |
+
|
| 34 |
|
| 35 |
# ==========================================
|
| 36 |
# 0. SESSION STATE (for camera flow)
|
functions.py
CHANGED
|
@@ -2,8 +2,7 @@
|
|
| 2 |
|
| 3 |
import numpy as np
|
| 4 |
import matplotlib.pyplot as plt
|
| 5 |
-
|
| 6 |
-
import mediapipe as mp # Kept for potential vision functions you might use later
|
| 7 |
import math
|
| 8 |
from matplotlib.ticker import MultipleLocator
|
| 9 |
|
|
|
|
| 2 |
|
| 3 |
import numpy as np
|
| 4 |
import matplotlib.pyplot as plt
|
| 5 |
+
|
|
|
|
| 6 |
import math
|
| 7 |
from matplotlib.ticker import MultipleLocator
|
| 8 |
|