fantos commited on
Commit
c1e33d1
·
verified ·
1 Parent(s): 1c14b98

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +45 -19
app.py CHANGED
@@ -59,6 +59,10 @@ custom_css = """
59
  padding: 2rem;
60
  margin: 1rem;
61
  transition: all 0.3s ease;
 
 
 
 
62
  }
63
 
64
  .title {
@@ -120,8 +124,27 @@ custom_css = """
120
  margin-top: 2rem;
121
  background: linear-gradient(145deg, #f3f4f6, #ffffff);
122
  border-radius: 15px;
123
- padding: 1.5rem;
124
  box-shadow: 5px 5px 10px #d1d1d1, -5px -5px 10px #ffffff;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
125
  }
126
  """
127
 
@@ -134,12 +157,13 @@ with gr.Blocks(css=custom_css) as demo:
134
  with gr.Row(elem_classes="container"):
135
  # Left column for text input
136
  with gr.Column(scale=1):
137
- text_input = gr.Textbox(
138
- label="Text to Synthesize",
139
- placeholder="Enter text here...",
140
- elem_classes="input-group",
141
- lines=5
142
- )
 
143
 
144
  submit_button = gr.Button(
145
  "Generate Speech",
@@ -164,19 +188,21 @@ with gr.Blocks(css=custom_css) as demo:
164
  elem_classes="input-group"
165
  )
166
 
167
- temperature = gr.Slider(
168
- 0.1, 1.0,
169
- value=0.1,
170
- label="Temperature (lower = more stable tone, higher = more expressive)",
171
- elem_classes="slider-3d"
172
- )
 
173
 
174
- repetition_penalty = gr.Slider(
175
- 0.5, 2.0,
176
- value=1.1,
177
- label="Repetition Penalty",
178
- elem_classes="slider-3d"
179
- )
 
180
 
181
  reference_audio = gr.Audio(
182
  label="Reference Audio (for voice cloning)",
 
59
  padding: 2rem;
60
  margin: 1rem;
61
  transition: all 0.3s ease;
62
+ min-height: 800px;
63
+ width: 100%;
64
+ max-width: 1400px;
65
+ margin: 0 auto;
66
  }
67
 
68
  .title {
 
124
  margin-top: 2rem;
125
  background: linear-gradient(145deg, #f3f4f6, #ffffff);
126
  border-radius: 15px;
127
+ padding: 2.5rem;
128
  box-shadow: 5px 5px 10px #d1d1d1, -5px -5px 10px #ffffff;
129
+ display: flex;
130
+ flex-direction: column;
131
+ gap: 2rem;
132
+ }
133
+
134
+ .input-box {
135
+ padding: 1.5rem;
136
+ background: #ffffff;
137
+ border-radius: 12px;
138
+ margin-bottom: 1.5rem;
139
+ box-shadow: inset 3px 3px 7px #e0e0e0, inset -3px -3px 7px #ffffff;
140
+ }
141
+
142
+ .slider-container {
143
+ margin: 2rem 0;
144
+ }
145
+
146
+ .textbox-container {
147
+ min-height: 150px;
148
  }
149
  """
150
 
 
157
  with gr.Row(elem_classes="container"):
158
  # Left column for text input
159
  with gr.Column(scale=1):
160
+ with gr.Group(elem_classes="textbox-container"):
161
+ text_input = gr.Textbox(
162
+ label="Text to Synthesize",
163
+ placeholder="Enter text here...",
164
+ elem_classes="input-group",
165
+ lines=8
166
+ )
167
 
168
  submit_button = gr.Button(
169
  "Generate Speech",
 
188
  elem_classes="input-group"
189
  )
190
 
191
+ with gr.Group(elem_classes="slider-container"):
192
+ temperature = gr.Slider(
193
+ 0.1, 1.0,
194
+ value=0.1,
195
+ label="Temperature (lower = more stable tone, higher = more expressive)",
196
+ elem_classes="slider-3d"
197
+ )
198
 
199
+ with gr.Group(elem_classes="slider-container"):
200
+ repetition_penalty = gr.Slider(
201
+ 0.5, 2.0,
202
+ value=1.1,
203
+ label="Repetition Penalty",
204
+ elem_classes="slider-3d"
205
+ )
206
 
207
  reference_audio = gr.Audio(
208
  label="Reference Audio (for voice cloning)",