thepianist9 commited on
Commit
5a460ee
1 Parent(s): cd8a0b8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
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 智能对话系统 (Linly-Talker)'):
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>Linly-Talker 是一款智能 AI 对话系统,结合了大型语言模型 (LLMs) 与视觉模型,是一种新颖的人工智能交互方式。</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 智能对话系统 (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('对话'):
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="生成视频", format="mp4", scale=1, autoplay=False)
333
- video_button = gr.Button("提交视频生成", 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():
 
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():