mirror of
https://github.com/HumanAIGC-Engineering/gradio-webrtc.git
synced 2026-02-04 09:29:23 +08:00
Tweak (#66)
* thanks * title fix * version bump --------- Co-authored-by: Freddy Boulton <freddyboulton@hf-freddy.local>
This commit is contained in:
@@ -185,7 +185,7 @@ class Stream(WebRTCConnectionMixin):
|
||||
gr.HTML(
|
||||
f"""
|
||||
<h1 style='text-align: center'>
|
||||
{ui_args.get("title", "Video Streaming (Powered by WebRTC ⚡️)")}
|
||||
{ui_args.get("title", "Video Streaming (Powered by FastRTC ⚡️)")}
|
||||
</h1>
|
||||
"""
|
||||
)
|
||||
@@ -224,7 +224,7 @@ class Stream(WebRTCConnectionMixin):
|
||||
gr.HTML(
|
||||
f"""
|
||||
<h1 style='text-align: center'>
|
||||
{ui_args.get("title", "Video Streaming (Powered by WebRTC ⚡️)")}
|
||||
{ui_args.get("title", "Video Streaming (Powered by FastRTC ⚡️)")}
|
||||
</h1>
|
||||
"""
|
||||
)
|
||||
@@ -264,7 +264,7 @@ class Stream(WebRTCConnectionMixin):
|
||||
gr.HTML(
|
||||
f"""
|
||||
<h1 style='text-align: center'>
|
||||
{ui_args.get("title", "Video Streaming (Powered by WebRTC ⚡️)")}
|
||||
{ui_args.get("title", "Video Streaming (Powered by FastRTC ⚡️)")}
|
||||
</h1>
|
||||
"""
|
||||
)
|
||||
@@ -301,9 +301,9 @@ class Stream(WebRTCConnectionMixin):
|
||||
elif self.modality == "audio" and self.mode == "receive":
|
||||
with gr.Blocks() as demo:
|
||||
gr.HTML(
|
||||
"""
|
||||
f"""
|
||||
<h1 style='text-align: center'>
|
||||
FastAPI (Powered by WebRTC ⚡️)
|
||||
{ui_args.get("title", "Audio Streaming (Powered by FastRTC ⚡️)")}
|
||||
</h1>
|
||||
"""
|
||||
)
|
||||
@@ -466,6 +466,8 @@ class Stream(WebRTCConnectionMixin):
|
||||
inputs=additional_output_components,
|
||||
outputs=additional_output_components,
|
||||
)
|
||||
else:
|
||||
raise ValueError(f"Invalid modality: {self.modality} and mode: {self.mode}")
|
||||
return demo
|
||||
|
||||
@property
|
||||
|
||||
@@ -16,6 +16,9 @@ The Real-Time Communication Library for Python.
|
||||
</h3>
|
||||
|
||||
Turn any python function into a real-time audio and video stream over WebRTC or WebSockets.
|
||||
|
||||
<video src="https://github.com/user-attachments/assets/6fb7f4fe-c5b2-48f3-88ff-f563611812ec" controls></video>
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
|
||||
@@ -8,7 +8,7 @@ build-backend = "hatchling.build"
|
||||
|
||||
[project]
|
||||
name = "fastrtc"
|
||||
version = "0.0.3.post9"
|
||||
version = "0.0.3.post11"
|
||||
description = "The realtime communication library for Python"
|
||||
readme = "README.md"
|
||||
license = "apache-2.0"
|
||||
|
||||
Reference in New Issue
Block a user