Spaces:
Sleeping
Sleeping
import sqlalchemy | |
from pgvector.sqlalchemy import Vector | |
from sqlalchemy.orm import declarative_base | |
Base = declarative_base() # type: Any | |
class Article(Base): | |
"""Embedding store.""" | |
__tablename__ = "article" | |
id = sqlalchemy.Column(sqlalchemy.Integer, primary_key=True, nullable=False) | |
title = sqlalchemy.Column(sqlalchemy.String, nullable=True) | |
abstract = sqlalchemy.Column(sqlalchemy.String, nullable=True) | |
embedding: Vector = sqlalchemy.Column("abstract_embedding", Vector(None)) | |
doi = sqlalchemy.Column(sqlalchemy.String, nullable=True) | |