I have a pipeline with the model I want to use. Outside of the project, I have an app.py
file where I'm going to create the UI/UX for my users to run my model. Right now I'm just using a sample string but later on, you can imagine that there will be a textbox for users to type.
How can I pass the user input as an input to the pipeline? I though I would be able to do so with the kedro.framework.session.session.KedroSession
as seen in the code below, but doing so results in the error ValueError: Pipeline input(s) {'user-input'} not found in the DataCatalog
from kedro.framework.session import KedroSession
from kedro.framework.startup import bootstrap_project
from kedro.io import MemoryDataSet
import os
bootstrap_project("<project path>")
user_input = "this is a sample text"
user_input = MemoryDataSet(user_input)
with KedroSession.create("project") as session:
output = session.run(
"nlp-pipeline",
from_inputs={
"user-input": user_input
}
)
print(output)