pn23 commited on
Commit
3fce310
·
verified ·
1 Parent(s): 0dac48f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -31
app.py CHANGED
@@ -1,9 +1,7 @@
1
  import streamlit as st
2
  import numpy as np
3
  import cv2
4
- import av
5
  import mediapipe as mp
6
- from streamlit_webrtc import webrtc_streamer, WebRtcMode, RTCConfiguration
7
 
8
  title = st.title("Welcome to Therapute")
9
 
@@ -17,32 +15,4 @@ curr_exer = st.radio('Select an exercise', exercise_options)
17
  x = st.slider('Select a value')
18
  st.write(x, 'squared is', x * x)
19
  st.write(curr_exer)
20
- st.success("Success")
21
-
22
-
23
-
24
-
25
- RTC_CONFIGURATION = RTCConfiguration(
26
- {"iceServers": [{"urls": ["stun:stun.l.google.com:19302"]}]}
27
- )
28
- webrtc_ctx = webrtc_streamer(
29
- key="TEST",
30
- mode=WebRtcMode.SENDRECV,
31
- rtc_configuration=RTC_CONFIGURATION,
32
- media_stream_constraints={"video": True, "audio": False},
33
- async_processing=True,
34
- )
35
-
36
- class VideoProcessor:
37
- def recv(self, frame):
38
- img = frame.to_ndarray(format="bgr24")
39
- # img = process(img)
40
- return av.VideoFrame.from_ndarray(img, format="bgr24")
41
- webrtc_ctx = webrtc_streamer(
42
- key="WYH",
43
- mode=WebRtcMode.SENDRECV,
44
- rtc_configuration=RTC_CONFIGURATION,
45
- media_stream_constraints={"video": True, "audio": False},
46
- video_processor_factory=VideoProcessor,
47
- async_processing=True,
48
- )
 
1
  import streamlit as st
2
  import numpy as np
3
  import cv2
 
4
  import mediapipe as mp
 
5
 
6
  title = st.title("Welcome to Therapute")
7
 
 
15
  x = st.slider('Select a value')
16
  st.write(x, 'squared is', x * x)
17
  st.write(curr_exer)
18
+ st.success("Success")