Spaces:
Sleeping
Sleeping
File size: 575 Bytes
68a9b68 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
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)
|