abcdef12356 commited on
Commit
a24f54d
·
1 Parent(s): f259229

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -16
app.py CHANGED
@@ -1,16 +1,8 @@
1
- import streamlit as st
2
- import time
3
-
4
- # Capture a photo using the camera input
5
- picture = st.camera_input("Take a picture...")
6
-
7
- if picture:
8
- # Save the picture to a file (e.g., test.jpg)
9
- with open('test.jpg', 'wb') as file:
10
- file.write(picture.getbuffer())
11
- st.image(picture, caption="Captured Photo", use_column_width=True)
12
-
13
- # Display the photo every 10 seconds
14
- while True:
15
- time.sleep(10)
16
- st.image(picture, caption="Captured Photo", use_column_width=True)
 
1
+ import streamlit_webrtc
2
+ webrtc_streamer(
3
+ # ...
4
+ rtc_configuration={ # Add this config
5
+ "iceServers": [{"urls": ["stun:stun.l.google.com:19302"]}]
6
+ }
7
+ # ...
8
+ )