Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -86,7 +86,7 @@ def generate_audio(english_caption: str, russian_caption: str, audio_language: s
|
|
86 |
text = russian_caption if audio_language == "Русский" else english_caption
|
87 |
return pipeline.generate_audio(text, audio_language)
|
88 |
|
89 |
-
with gr.Blocks(css=".btn {width: 200px; background-color: #4B0082; color: white; border: none; padding: 10px 20px; text-align: center; font-size: 16px; margin: 0 auto; display: block;} .equal-height {height:
|
90 |
with gr.Row():
|
91 |
with gr.Column(scale=1, min_width=400, variant="panel"):
|
92 |
image = gr.Image(type="pil", label="Изображение", height=400, width=400)
|
@@ -94,10 +94,11 @@ with gr.Blocks(css=".btn {width: 200px; background-color: #4B0082; color: white;
|
|
94 |
with gr.Column(scale=1, min_width=300):
|
95 |
english_caption = gr.Textbox(label="Описание на English:", lines=2)
|
96 |
russian_caption = gr.Textbox(label="Описание на Русском:", lines=2)
|
97 |
-
|
98 |
-
audio_language = gr.Dropdown(choices=["Русский", "English"], label="Язык озвучки", value="Русский", scale=1, min_width=200, elem_classes="equal-height")
|
99 |
-
audio_output = gr.Audio(label="Озвучка", scale=1, min_width=200, elem_classes="equal-height")
|
100 |
with gr.Column(scale=1):
|
|
|
|
|
|
|
101 |
audio_button = gr.Button("Сгенерировать озвучку", elem_classes="btn")
|
102 |
|
103 |
submit_button.click(
|
|
|
86 |
text = russian_caption if audio_language == "Русский" else english_caption
|
87 |
return pipeline.generate_audio(text, audio_language)
|
88 |
|
89 |
+
with gr.Blocks(css=".btn {width: 200px; background-color: #4B0082; color: white; border: none; padding: 10px 20px; text-align: center; font-size: 16px; margin: 0 auto; display: block;} .equal-height {height: 80px !important;}") as iface:
|
90 |
with gr.Row():
|
91 |
with gr.Column(scale=1, min_width=400, variant="panel"):
|
92 |
image = gr.Image(type="pil", label="Изображение", height=400, width=400)
|
|
|
94 |
with gr.Column(scale=1, min_width=300):
|
95 |
english_caption = gr.Textbox(label="Описание на English:", lines=2)
|
96 |
russian_caption = gr.Textbox(label="Описание на Русском:", lines=2)
|
97 |
+
with gr.Row():
|
|
|
|
|
98 |
with gr.Column(scale=1):
|
99 |
+
with gr.Row():
|
100 |
+
audio_language = gr.Dropdown(choices=["Русский", "English"], label="Язык озвучки", value="Русский", elem_classes="equal-height")
|
101 |
+
audio_output = gr.Audio(label="Озвучка", elem_classes="equal-height")
|
102 |
audio_button = gr.Button("Сгенерировать озвучку", elem_classes="btn")
|
103 |
|
104 |
submit_button.click(
|