Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -46,6 +46,10 @@ style="""
|
|
46 |
.frame_class{
|
47 |
display:none;
|
48 |
}
|
|
|
|
|
|
|
|
|
49 |
"""
|
50 |
|
51 |
head = """
|
@@ -162,12 +166,16 @@ def stream_aud(inp):
|
|
162 |
yield(pp.stream_tts(in_text=txt,model="en_US-joe-medium"))
|
163 |
|
164 |
with gr.Blocks(css=style,head=head) as b:
|
|
|
|
|
|
|
|
|
165 |
with gr.Group():
|
166 |
with gr.Row():
|
167 |
query=gr.Textbox(label="Query")
|
168 |
num=gr.Number(label="Count",step=1,value=10,interactive=False)
|
169 |
-
|
170 |
-
|
171 |
with gr.Group():
|
172 |
with gr.Row():
|
173 |
prev_btn=gr.Button("Previous",interactive=False)
|
@@ -183,4 +191,4 @@ with gr.Blocks(css=style,head=head) as b:
|
|
183 |
prev_btn.click(prev_show,[hid_start],[prev_btn,hid_start]).then(show_num,hid_start,show_html).then(search,[query,num,hid_start],[html_out])
|
184 |
|
185 |
sub.click(search,[query,num,hid_start],[html_out]).then(show_num,hid_start,show_html)
|
186 |
-
b.launch()
|
|
|
46 |
.frame_class{
|
47 |
display:none;
|
48 |
}
|
49 |
+
#big_btn {
|
50 |
+
height:50px;
|
51 |
+
border-radius:15px;
|
52 |
+
}
|
53 |
"""
|
54 |
|
55 |
head = """
|
|
|
166 |
yield(pp.stream_tts(in_text=txt,model="en_US-joe-medium"))
|
167 |
|
168 |
with gr.Blocks(css=style,head=head) as b:
|
169 |
+
gr.HTML("""<h1 style='font-size:xxx-large;font-weight:900;'>arVix Reader with Voice</h1>
|
170 |
+
<h4>Piper: <a href='https://github.com/rhasspy/piper' target='_blank'>https://github.com/rhasspy/piper</a></h4>
|
171 |
+
<h4>PyPiperTTS: <a href='https://github.com/broadfield-dev/PyPiperTTS' target='_blank'>https://github.com/broadfield-dev/PyPiperTTS</a></h4>
|
172 |
+
""")
|
173 |
with gr.Group():
|
174 |
with gr.Row():
|
175 |
query=gr.Textbox(label="Query")
|
176 |
num=gr.Number(label="Count",step=1,value=10,interactive=False)
|
177 |
+
with gr.Row():
|
178 |
+
sub=gr.Button(elem_id='big_btn')
|
179 |
with gr.Group():
|
180 |
with gr.Row():
|
181 |
prev_btn=gr.Button("Previous",interactive=False)
|
|
|
191 |
prev_btn.click(prev_show,[hid_start],[prev_btn,hid_start]).then(show_num,hid_start,show_html).then(search,[query,num,hid_start],[html_out])
|
192 |
|
193 |
sub.click(search,[query,num,hid_start],[html_out]).then(show_num,hid_start,show_html)
|
194 |
+
b.queue(default_concurrency_limit=20).launch(max_threads=40)
|