Spaces:
Sleeping
Sleeping
Ankit Yadav
commited on
Commit
·
2746e4c
1
Parent(s):
1428efb
Jarvis Model
Browse files
app.py
CHANGED
@@ -68,11 +68,11 @@ async def generate2(prompt):
|
|
68 |
for response in stream:
|
69 |
output += response.token.text
|
70 |
|
71 |
-
communicate = edge_tts.Communicate(output)
|
72 |
-
with tempfile.NamedTemporaryFile(delete=False, suffix=".wav") as tmp_file:
|
73 |
-
|
74 |
-
|
75 |
-
yield
|
76 |
|
77 |
client3 = InferenceClient("meta-llama/Meta-Llama-3-70B-Instruct")
|
78 |
|
@@ -111,7 +111,7 @@ with gr.Blocks(css="style.css") as demo:
|
|
111 |
# elem_classes="audio")
|
112 |
with gr.Row():
|
113 |
translate_btn = gr.Button("Response")
|
114 |
-
translate_btn.click(fn=
|
115 |
outputs=output_text, api_name="translate")
|
116 |
|
117 |
gr.Markdown(MORE)
|
|
|
68 |
for response in stream:
|
69 |
output += response.token.text
|
70 |
|
71 |
+
# communicate = edge_tts.Communicate(output)
|
72 |
+
# with tempfile.NamedTemporaryFile(delete=False, suffix=".wav") as tmp_file:
|
73 |
+
# tmp_path = tmp_file.name
|
74 |
+
# await communicate.save(tmp_path)
|
75 |
+
yield output
|
76 |
|
77 |
client3 = InferenceClient("meta-llama/Meta-Llama-3-70B-Instruct")
|
78 |
|
|
|
111 |
# elem_classes="audio")
|
112 |
with gr.Row():
|
113 |
translate_btn = gr.Button("Response")
|
114 |
+
translate_btn.click(fn=generate2, inputs=user_input,
|
115 |
outputs=output_text, api_name="translate")
|
116 |
|
117 |
gr.Markdown(MORE)
|