wenmengzhou commited on
Commit
a2ad7fa
1 Parent(s): 4039743

Update app.py

Browse files

translate to english

Files changed (1) hide show
  1. app.py +43 -3
app.py CHANGED
@@ -17,8 +17,48 @@ from css.advanced import advanced
17
  from css.custom import custom
18
  from css.preset import preset
19
 
20
- audio_mode_choices = [('预置语音生成', 'preset'), ('定制语音生成(复刻录制声音)', 'custom'),
21
- ('高级语音生成(自然语言控制)', 'advanced')]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
 
23
 
24
 
@@ -41,7 +81,7 @@ default_layout = 'preset'
41
  with gr.Blocks(theme=gr.themes.Soft(), css=custom_css) as demo:
42
  audio_mode_radio = gr.Radio(choices=audio_mode_choices,
43
  value=default_layout,
44
- label="选择语音生成模式")
45
  with gr.Row():
46
  with gr.Column(visible=default_layout == 'preset') as preset_layout:
47
  preset()
 
17
  from css.custom import custom
18
  from css.preset import preset
19
 
20
+ # audio_mode_choices = [('预置语音生成', 'preset'), ('定制语音生成(复刻录制声音)', 'custom'),
21
+ # ('高级语音生成(自然语言控制)', 'advanced')]
22
+
23
+
24
+
25
+ # def on_audio_mode_change(_audio_mode_radio):
26
+ # yield {
27
+ # preset_layout: gr.update(visible=_audio_mode_radio == 'preset'),
28
+ # custom_layout: gr.update(visible=_audio_mode_radio == 'custom'),
29
+ # advanced_layout: gr.update(visible=_audio_mode_radio == 'advanced')
30
+ # }
31
+
32
+
33
+ # custom_css = """
34
+ # .full-height {
35
+ # height: 100%;
36
+ # }
37
+ # """
38
+
39
+ # default_layout = 'preset'
40
+
41
+ # with gr.Blocks(theme=gr.themes.Soft(), css=custom_css) as demo:
42
+ # audio_mode_radio = gr.Radio(choices=audio_mode_choices,
43
+ # value=default_layout,
44
+ # label="选择语音生成模式")
45
+ # with gr.Row():
46
+ # with gr.Column(visible=default_layout == 'preset') as preset_layout:
47
+ # preset()
48
+ # with gr.Column(visible=default_layout == 'custom') as custom_layout:
49
+ # custom()
50
+ # with gr.Column(
51
+ # visible=default_layout == 'advanced') as advanced_layout:
52
+ # advanced()
53
+
54
+ # audio_mode_radio.change(
55
+ # fn=on_audio_mode_change,
56
+ # inputs=[audio_mode_radio],
57
+ # outputs=[preset_layout, custom_layout, advanced_layout])
58
+
59
+
60
+ audio_mode_choices = [('Preset voice generation', 'preset'), ('Custom voice generation (replicate recorded voice)', 'custom'),
61
+ ('Advanced voice generation (natural language control)', 'advanced')]
62
 
63
 
64
 
 
81
  with gr.Blocks(theme=gr.themes.Soft(), css=custom_css) as demo:
82
  audio_mode_radio = gr.Radio(choices=audio_mode_choices,
83
  value=default_layout,
84
+ label="Select voice generation mode")
85
  with gr.Row():
86
  with gr.Column(visible=default_layout == 'preset') as preset_layout:
87
  preset()