Spaces:
Runtime error
Runtime error
Update LLMwithvoice.py
Browse files- LLMwithvoice.py +6 -1
LLMwithvoice.py
CHANGED
@@ -38,4 +38,9 @@ def chat_with_roberta(api_token, question, context):
|
|
38 |
def generate_speech(api_token, text):
|
39 |
payload = {"inputs": text}
|
40 |
audio_bytes = query_tts(api_token, payload)
|
41 |
-
return audio_bytes
|
|
|
|
|
|
|
|
|
|
|
|
38 |
def generate_speech(api_token, text):
|
39 |
payload = {"inputs": text}
|
40 |
audio_bytes = query_tts(api_token, payload)
|
41 |
+
return audio_bytes
|
42 |
+
|
43 |
+
def gradio_interface(api_token, context, question):
|
44 |
+
answer = chat_with_roberta(api_token, question, context)
|
45 |
+
audio_bytes = generate_speech(api_token, answer)
|
46 |
+
return answer, audio_bytes
|