Spaces:
Sleeping
Sleeping
thepianist9
commited on
Commit
•
5a460ee
1
Parent(s):
cd8a0b8
Update app.py
Browse files
app.py
CHANGED
@@ -12,7 +12,7 @@ from src.cost_time import calculate_time
|
|
12 |
from configs import *
|
13 |
os.environ["GRADIO_TEMP_DIR"]= './temp'
|
14 |
|
15 |
-
def get_title(title = 'Linly
|
16 |
description = f"""
|
17 |
<p style="text-align: center; font-weight: bold;">
|
18 |
<span style="font-size: 28px;">{title}</span>
|
@@ -24,7 +24,7 @@ def get_title(title = 'Linly 智能对话系统 (Linly-Talker)'):
|
|
24 |
[<a herf="https://kedreamix.github.io/" target="_blank">个人主页</a>]
|
25 |
</span>
|
26 |
<br>
|
27 |
-
<span>
|
28 |
</p>
|
29 |
"""
|
30 |
return description
|
@@ -314,23 +314,23 @@ def Talker_response_img(question_audio, method, text, voice, rate, volume, pitch
|
|
314 |
|
315 |
def app():
|
316 |
with gr.Blocks(analytics_enabled=False, title = 'Linly-Talker') as inference:
|
317 |
-
gr.HTML(get_title("Linly
|
318 |
with gr.Row(equal_height=False):
|
319 |
with gr.Column(variant='panel'):
|
320 |
with gr.Tabs(elem_id="question_audio"):
|
321 |
-
with gr.TabItem('
|
322 |
with gr.Column(variant='panel'):
|
323 |
-
question_audio = gr.Audio(sources=['microphone','upload'], type="filepath", label = '
|
324 |
input_text = gr.Textbox(label="Input Text", lines=3)
|
325 |
voice, rate, volume, pitch, batch_size, character, method = voice_setting(tts.SUPPORTED_VOICE)
|
326 |
-
asr_text = gr.Button('
|
327 |
asr_text.click(fn=Asr,inputs=[question_audio],outputs=[input_text])
|
328 |
|
329 |
with gr.Column(variant='panel'):
|
330 |
with gr.Tabs():
|
331 |
-
with gr.TabItem('
|
332 |
-
gen_video = gr.Video(label="
|
333 |
-
video_button = gr.Button("
|
334 |
video_button.click(fn=Talker_response,inputs=[question_audio, method, input_text,voice, rate, volume, pitch, batch_size, character],outputs=[gen_video])
|
335 |
|
336 |
with gr.Row():
|
|
|
12 |
from configs import *
|
13 |
os.environ["GRADIO_TEMP_DIR"]= './temp'
|
14 |
|
15 |
+
def get_title(title = 'Linly (Linly-Talker)'):
|
16 |
description = f"""
|
17 |
<p style="text-align: center; font-weight: bold;">
|
18 |
<span style="font-size: 28px;">{title}</span>
|
|
|
24 |
[<a herf="https://kedreamix.github.io/" target="_blank">个人主页</a>]
|
25 |
</span>
|
26 |
<br>
|
27 |
+
<span>Intelligent dialogue system that combines LLMs with Visual Generation models</span>
|
28 |
</p>
|
29 |
"""
|
30 |
return description
|
|
|
314 |
|
315 |
def app():
|
316 |
with gr.Blocks(analytics_enabled=False, title = 'Linly-Talker') as inference:
|
317 |
+
gr.HTML(get_title("Linly (Linly-Talker)"))
|
318 |
with gr.Row(equal_height=False):
|
319 |
with gr.Column(variant='panel'):
|
320 |
with gr.Tabs(elem_id="question_audio"):
|
321 |
+
with gr.TabItem('Dialogue'):
|
322 |
with gr.Column(variant='panel'):
|
323 |
+
question_audio = gr.Audio(sources=['microphone','upload'], type="filepath", label = 'Voice Conversation')
|
324 |
input_text = gr.Textbox(label="Input Text", lines=3)
|
325 |
voice, rate, volume, pitch, batch_size, character, method = voice_setting(tts.SUPPORTED_VOICE)
|
326 |
+
asr_text = gr.Button('Voice Recognition tab click to record')
|
327 |
asr_text.click(fn=Asr,inputs=[question_audio],outputs=[input_text])
|
328 |
|
329 |
with gr.Column(variant='panel'):
|
330 |
with gr.Tabs():
|
331 |
+
with gr.TabItem('Digital People Q&A'):
|
332 |
+
gen_video = gr.Video(label="Generate ", format="mp4", scale=1, autoplay=False)
|
333 |
+
video_button = gr.Button("Submit for video generation", variant='primary')
|
334 |
video_button.click(fn=Talker_response,inputs=[question_audio, method, input_text,voice, rate, volume, pitch, batch_size, character],outputs=[gen_video])
|
335 |
|
336 |
with gr.Row():
|