Spaces:
Sleeping
Sleeping
Update interaction.py
Browse files- interaction.py +5 -3
interaction.py
CHANGED
|
@@ -13,9 +13,11 @@ def init_pipeline():
|
|
| 13 |
return pipeline
|
| 14 |
|
| 15 |
def generate_response(question, pipeline):
|
| 16 |
-
response = pipeline.run({
|
| 17 |
-
|
| 18 |
-
|
|
|
|
|
|
|
| 19 |
|
| 20 |
def audio_response(response):
|
| 21 |
audio_stream="response_audio.mp3"
|
|
|
|
| 13 |
return pipeline
|
| 14 |
|
| 15 |
def generate_response(question, pipeline):
|
| 16 |
+
response = pipeline.run({
|
| 17 |
+
'retriever':{"query":question},
|
| 18 |
+
'prompt_builder':{'question':question}
|
| 19 |
+
})
|
| 20 |
+
return response['llm']['replies'][0]
|
| 21 |
|
| 22 |
def audio_response(response):
|
| 23 |
audio_stream="response_audio.mp3"
|