mirror of
https://github.com/HumanAIGC-Engineering/gradio-webrtc.git
synced 2026-02-04 17:39:23 +08:00
Add code (#70)
Co-authored-by: Freddy Boulton <freddyboulton@hf-freddy.local>
This commit is contained in:
@@ -120,8 +120,8 @@ stream = Stream(
|
||||
],
|
||||
ui_args={
|
||||
"icon": "https://www.gstatic.com/lamda/images/gemini_favicon_f069958c85030456e93de685481c559f160ea06b.png",
|
||||
"pulse_color": "rgb(35, 157, 225)",
|
||||
"icon_button_color": "rgb(35, 157, 225)",
|
||||
"pulse_color": "rgb(255, 255, 255)",
|
||||
"icon_button_color": "rgb(255, 255, 255)",
|
||||
"title": "Gemini Audio Video Chat",
|
||||
},
|
||||
)
|
||||
@@ -157,8 +157,8 @@ with gr.Blocks(css=css) as demo:
|
||||
if get_space() == "spaces"
|
||||
else None,
|
||||
icon="https://www.gstatic.com/lamda/images/gemini_favicon_f069958c85030456e93de685481c559f160ea06b.png",
|
||||
pulse_color="rgb(35, 157, 225)",
|
||||
icon_button_color="rgb(35, 157, 225)",
|
||||
pulse_color="rgb(255, 255, 255)",
|
||||
icon_button_color="rgb(255, 255, 255)",
|
||||
)
|
||||
with gr.Column():
|
||||
image_input = gr.Image(
|
||||
|
||||
@@ -94,7 +94,7 @@ stream = Stream(
|
||||
additional_inputs=[
|
||||
gr.Dropdown(
|
||||
choices=voice_ids,
|
||||
value="katherine",
|
||||
value="victoria",
|
||||
label="Voice",
|
||||
info="Select a voice from the dropdown",
|
||||
)
|
||||
|
||||
@@ -54,7 +54,7 @@ The `Stream` has three main methods:
|
||||
yield audio
|
||||
|
||||
stream = Stream(
|
||||
handler=ReplyOnPause(detection),
|
||||
handler=ReplyOnPause(echo),
|
||||
modality="audio",
|
||||
mode="send-receive",
|
||||
)
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: contain;
|
||||
filter: brightness(0) invert(1);
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.pulse-ring {
|
||||
|
||||
@@ -8,7 +8,7 @@ build-backend = "hatchling.build"
|
||||
|
||||
[project]
|
||||
name = "fastrtc"
|
||||
version = "0.0.4.post1"
|
||||
version = "0.0.4.post2"
|
||||
description = "The realtime communication library for Python"
|
||||
readme = "README.md"
|
||||
license = "apache-2.0"
|
||||
|
||||
Reference in New Issue
Block a user