include feed section
"app"
]
},
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Feed data to the app "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "To feed data we need to specify the `schema` that we are sending data to. Each data point needs to have a unique `data_id` associated with it, independent of having an id field or not. The `fields` should be a dict containing all the fields in the schema. "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "app.feed_data_point(\n",
+ " schema = \"msmarco\", \n",
+ " data_id = 1, \n",
+ " fields = {\n",
+ " \"id\": \"1\", \n",
+ " \"title\": \"This is a text\", \n",
+ " \"body\": \"This is the body of the text\"\n",
+ " }\n",
+ ")"
+ ]
+ },
{
"cell_type": "markdown",
"metadata": {},
