This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Fetch some text content in two different categories | |
| from wikipediaapi import Wikipedia | |
| wiki = Wikipedia('en') | |
| docs = [{"text": x, "category": "person"} | |
| for x in wiki.page('Hayao_Miyazaki').text.split('\n\n')] | |
| docs += [{"text": x, "category": "film"} | |
| for x in wiki.page('Spirited_Away').text.split('\n\n')] | |
| # Enter LanceDB | |
| from lancedb.pydantic import LanceModel, Vector |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from flask import Flask | |
| from flask_restful import Api, Resource, reqparse | |
| app = Flask(__name__) | |
| api = Api(app) | |
| users = [ | |
| { | |
| "name": "Nicholas", | |
| "age": 42, |