Update streamlit-webrtc to 0.48.1
Browse files- README.md +1 -1
- app.py +1 -4
- pages/1_object_detection.py +1 -4
- pages/8_media_files_streaming.py +1 -0
- requirements.txt +2 -2
- sample_utils/download.py +1 -1
README.md
CHANGED
|
@@ -4,7 +4,7 @@ emoji: 🌍
|
|
| 4 |
colorFrom: purple
|
| 5 |
colorTo: yellow
|
| 6 |
sdk: streamlit
|
| 7 |
-
sdk_version: 1.
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
license: mit
|
|
|
|
| 4 |
colorFrom: purple
|
| 5 |
colorTo: yellow
|
| 6 |
sdk: streamlit
|
| 7 |
+
sdk_version: 1.41.0
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
license: mit
|
app.py
CHANGED
|
@@ -138,10 +138,7 @@ def video_frame_callback(frame: av.VideoFrame) -> av.VideoFrame:
|
|
| 138 |
webrtc_ctx = webrtc_streamer(
|
| 139 |
key="object-detection",
|
| 140 |
mode=WebRtcMode.SENDRECV,
|
| 141 |
-
rtc_configuration={
|
| 142 |
-
"iceServers": get_ice_servers(),
|
| 143 |
-
"iceTransportPolicy": "relay",
|
| 144 |
-
},
|
| 145 |
video_frame_callback=video_frame_callback,
|
| 146 |
media_stream_constraints={"video": True, "audio": False},
|
| 147 |
async_processing=True,
|
|
|
|
| 138 |
webrtc_ctx = webrtc_streamer(
|
| 139 |
key="object-detection",
|
| 140 |
mode=WebRtcMode.SENDRECV,
|
| 141 |
+
rtc_configuration={"iceServers": get_ice_servers()},
|
|
|
|
|
|
|
|
|
|
| 142 |
video_frame_callback=video_frame_callback,
|
| 143 |
media_stream_constraints={"video": True, "audio": False},
|
| 144 |
async_processing=True,
|
pages/1_object_detection.py
CHANGED
|
@@ -138,10 +138,7 @@ def video_frame_callback(frame: av.VideoFrame) -> av.VideoFrame:
|
|
| 138 |
webrtc_ctx = webrtc_streamer(
|
| 139 |
key="object-detection",
|
| 140 |
mode=WebRtcMode.SENDRECV,
|
| 141 |
-
rtc_configuration={
|
| 142 |
-
"iceServers": get_ice_servers(),
|
| 143 |
-
"iceTransportPolicy": "relay",
|
| 144 |
-
},
|
| 145 |
video_frame_callback=video_frame_callback,
|
| 146 |
media_stream_constraints={"video": True, "audio": False},
|
| 147 |
async_processing=True,
|
|
|
|
| 138 |
webrtc_ctx = webrtc_streamer(
|
| 139 |
key="object-detection",
|
| 140 |
mode=WebRtcMode.SENDRECV,
|
| 141 |
+
rtc_configuration={"iceServers": get_ice_servers()},
|
|
|
|
|
|
|
|
|
|
| 142 |
video_frame_callback=video_frame_callback,
|
| 143 |
media_stream_constraints={"video": True, "audio": False},
|
| 144 |
async_processing=True,
|
pages/8_media_files_streaming.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
"""Media streamings"""
|
|
|
|
| 2 |
import logging
|
| 3 |
from pathlib import Path
|
| 4 |
from typing import Dict, Optional, cast
|
|
|
|
| 1 |
"""Media streamings"""
|
| 2 |
+
|
| 3 |
import logging
|
| 4 |
from pathlib import Path
|
| 5 |
from typing import Dict, Optional, cast
|
requirements.txt
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
opencv-python-headless
|
| 2 |
pydub==0.25.1
|
| 3 |
-
streamlit_webrtc~=0.
|
| 4 |
-
twilio~=
|
| 5 |
matplotlib
|
|
|
|
| 1 |
opencv-python-headless
|
| 2 |
pydub==0.25.1
|
| 3 |
+
streamlit_webrtc~=0.48.1
|
| 4 |
+
twilio~=9.4.3
|
| 5 |
matplotlib
|
sample_utils/download.py
CHANGED
|
@@ -28,7 +28,7 @@ def download_file(url, download_to: Path, expected_size=None):
|
|
| 28 |
with urllib.request.urlopen(url) as response:
|
| 29 |
length = int(response.info()["Content-Length"])
|
| 30 |
counter = 0.0
|
| 31 |
-
MEGABYTES = 2.0
|
| 32 |
while True:
|
| 33 |
data = response.read(8192)
|
| 34 |
if not data:
|
|
|
|
| 28 |
with urllib.request.urlopen(url) as response:
|
| 29 |
length = int(response.info()["Content-Length"])
|
| 30 |
counter = 0.0
|
| 31 |
+
MEGABYTES = 2.0**20.0
|
| 32 |
while True:
|
| 33 |
data = response.read(8192)
|
| 34 |
if not data:
|