Spaces:
Runtime error
Runtime error
import streamlit as st | |
from haystack import Pipeline | |
from haystack.schema import Answer | |
#Use this file to set up your Haystack pipeline and querying | |
# cached to make index and models load only at start | |
def start_haystack(): | |
#Use this function to contruct a pipeline | |
pipe = Pipeline() | |
return pipe | |
pipe = start_haystack() | |
def query(question): | |
print("Received question") | |
params = {} | |
# results = pipe.run(question, params=params) | |
return [Answer(answer="results", context="Call pipe.run(question, params=params) and return results in /utils/haystack.py query()")] |