Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -47,14 +47,16 @@ def load_mod(model):
|
|
47 |
yield f"Loading: {model}"
|
48 |
pp.load_mod(model)
|
49 |
yield f"Voice Loaded: {model}"
|
|
|
50 |
def tts(inp,names,length,noise,width,sen_pause):
|
51 |
-
print(inp)
|
52 |
print(inp[-1][-1])
|
53 |
txt = inp[-1][-1].strip("</s>")
|
54 |
#decoded_text = codecs.decode(txt, "unicode_escape")
|
55 |
yield from pp.stream_tts(txt,names,length,noise,width,sen_pause)
|
56 |
|
57 |
with gr.Blocks() as iface:
|
|
|
58 |
chatbot=gr.Chatbot(show_label=False, show_share_button=False, show_copy_button=True, layout="panel")
|
59 |
prompt = gr.Textbox(label="Prompt")
|
60 |
with gr.Row():
|
|
|
47 |
yield f"Loading: {model}"
|
48 |
pp.load_mod(model)
|
49 |
yield f"Voice Loaded: {model}"
|
50 |
+
|
51 |
def tts(inp,names,length,noise,width,sen_pause):
|
52 |
+
#print(inp)
|
53 |
print(inp[-1][-1])
|
54 |
txt = inp[-1][-1].strip("</s>")
|
55 |
#decoded_text = codecs.decode(txt, "unicode_escape")
|
56 |
yield from pp.stream_tts(txt,names,length,noise,width,sen_pause)
|
57 |
|
58 |
with gr.Blocks() as iface:
|
59 |
+
gr.HTML("""<center><div style='font-size:xx-large;font-weight:900;'>Mixtral 8x7b Chatbot + Piper TTS</div>""")
|
60 |
chatbot=gr.Chatbot(show_label=False, show_share_button=False, show_copy_button=True, layout="panel")
|
61 |
prompt = gr.Textbox(label="Prompt")
|
62 |
with gr.Row():
|