Hugging Face
Models
Datasets
Spaces
Buckets
new
Docs
Enterprise
Pricing
Website
Tasks
HuggingChat
Collections
Languages
Organizations
Community
Blog
Posts
Daily Papers
Hardware
Learn
Discord
Forum
GitHub
Solutions
Team & Enterprise
Hugging Face PRO
Enterprise Support
Inference Providers
Inference Endpoints
Storage Buckets
Log In
Sign Up
Spaces:
alienet
/
BookWorld
like
10
Running
App
Files
Files
Community
Fetching metadata from the HF Docker repository...
main
BookWorld
/
modules
/
db
/
BaseDB.py
alienet
first commit
e636070
over 1 year ago
Raw
Download with hf CLI
Copy download link
History
Blame
Contribute
Delete
Safe
225 Bytes
# BaseDB.py
from
abc
import
ABC, abstractmethod
class
BaseDB
(
ABC
):
@abstractmethod
def
init_from_data
(
self, data
):
pass
@abstractmethod
def
search
(
self, query, n_results
):
pass