* thanks

* title fix

* version bump

---------

Co-authored-by: Freddy Boulton <freddyboulton@hf-freddy.local>
This commit is contained in:
Freddy Boulton
2025-02-24 01:30:45 -05:00
committed by GitHub
parent 853d6a06b5
commit 3323ef28a8
3 changed files with 11 additions and 6 deletions

View File

@@ -185,7 +185,7 @@ class Stream(WebRTCConnectionMixin):
gr.HTML( gr.HTML(
f""" f"""
<h1 style='text-align: center'> <h1 style='text-align: center'>
{ui_args.get("title", "Video Streaming (Powered by WebRTC ⚡️)")} {ui_args.get("title", "Video Streaming (Powered by FastRTC ⚡️)")}
</h1> </h1>
""" """
) )
@@ -224,7 +224,7 @@ class Stream(WebRTCConnectionMixin):
gr.HTML( gr.HTML(
f""" f"""
<h1 style='text-align: center'> <h1 style='text-align: center'>
{ui_args.get("title", "Video Streaming (Powered by WebRTC ⚡️)")} {ui_args.get("title", "Video Streaming (Powered by FastRTC ⚡️)")}
</h1> </h1>
""" """
) )
@@ -264,7 +264,7 @@ class Stream(WebRTCConnectionMixin):
gr.HTML( gr.HTML(
f""" f"""
<h1 style='text-align: center'> <h1 style='text-align: center'>
{ui_args.get("title", "Video Streaming (Powered by WebRTC ⚡️)")} {ui_args.get("title", "Video Streaming (Powered by FastRTC ⚡️)")}
</h1> </h1>
""" """
) )
@@ -301,9 +301,9 @@ class Stream(WebRTCConnectionMixin):
elif self.modality == "audio" and self.mode == "receive": elif self.modality == "audio" and self.mode == "receive":
with gr.Blocks() as demo: with gr.Blocks() as demo:
gr.HTML( gr.HTML(
""" f"""
<h1 style='text-align: center'> <h1 style='text-align: center'>
FastAPI (Powered by WebRTC ⚡️) {ui_args.get("title", "Audio Streaming (Powered by FastRTC ⚡️)")}
</h1> </h1>
""" """
) )
@@ -466,6 +466,8 @@ class Stream(WebRTCConnectionMixin):
inputs=additional_output_components, inputs=additional_output_components,
outputs=additional_output_components, outputs=additional_output_components,
) )
else:
raise ValueError(f"Invalid modality: {self.modality} and mode: {self.mode}")
return demo return demo
@property @property

View File

@@ -16,6 +16,9 @@ The Real-Time Communication Library for Python.
</h3> </h3>
Turn any python function into a real-time audio and video stream over WebRTC or WebSockets. 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 ## Installation
```bash ```bash

View File

@@ -8,7 +8,7 @@ build-backend = "hatchling.build"
[project] [project]
name = "fastrtc" name = "fastrtc"
version = "0.0.3.post9" version = "0.0.3.post11"
description = "The realtime communication library for Python" description = "The realtime communication library for Python"
readme = "README.md" readme = "README.md"
license = "apache-2.0" license = "apache-2.0"