Create Api
Browse files
Api
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from gradio_webrtc import get_hf_turn_credentials, WebRTC
|
2 |
+
|
3 |
+
|
4 |
+
# Pass a valid access token for your Hugging Face account
|
5 |
+
# or set the HF_TOKEN environment variable
|
6 |
+
credentials = get_hf_turn_credentials(token=None)
|
7 |
+
|
8 |
+
with gr.Blcocks() as demo:
|
9 |
+
webrtc = WebRTC(rtc_configuration=credentials)
|
10 |
+
...
|
11 |
+
|
12 |
+
demo.launch()
|