Update app.py
Browse files
app.py
CHANGED
@@ -34,8 +34,6 @@ this demo is governed by the original [license](https://huggingface.co/spaces/ys
|
|
34 |
css = """.toast-wrap { display: none !important } """
|
35 |
|
36 |
|
37 |
-
os.environ["GRADIO_TEMP_DIR"] = "/home/yoach/spaces/tmp"
|
38 |
-
|
39 |
system_message = "\nYou are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature.\n\nIf a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information."
|
40 |
temperature = 0.9
|
41 |
top_p = 0.6
|
@@ -129,7 +127,7 @@ def generate_speech(history, agree):
|
|
129 |
for sentence in text_to_generate:
|
130 |
# generate speech by cloning a voice using default settings
|
131 |
wav = tts.tts(text=sentence,
|
132 |
-
speaker_wav="
|
133 |
decoder_iterations=20,
|
134 |
speed=1.2,
|
135 |
language="en")
|
@@ -152,7 +150,7 @@ with gr.Blocks(title=title) as demo:
|
|
152 |
chatbot = gr.Chatbot(
|
153 |
[],
|
154 |
elem_id="chatbot",
|
155 |
-
avatar_images=('
|
156 |
bubble_full_width=False,
|
157 |
)
|
158 |
|
|
|
34 |
css = """.toast-wrap { display: none !important } """
|
35 |
|
36 |
|
|
|
|
|
37 |
system_message = "\nYou are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature.\n\nIf a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information."
|
38 |
temperature = 0.9
|
39 |
top_p = 0.6
|
|
|
127 |
for sentence in text_to_generate:
|
128 |
# generate speech by cloning a voice using default settings
|
129 |
wav = tts.tts(text=sentence,
|
130 |
+
speaker_wav="examples/female.wav",
|
131 |
decoder_iterations=20,
|
132 |
speed=1.2,
|
133 |
language="en")
|
|
|
150 |
chatbot = gr.Chatbot(
|
151 |
[],
|
152 |
elem_id="chatbot",
|
153 |
+
avatar_images=('examples/lama.jpeg', 'examples/lama2.jpeg'),
|
154 |
bubble_full_width=False,
|
155 |
)
|
156 |
|