mirror of
https://github.com/SikongJueluo/Mini-Nav.git
synced 2026-03-12 12:25:32 +08:00
feat(visualizer): integrate image upload with similarity search
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from typing import Optional
|
||||
|
||||
import lancedb
|
||||
import pyarrow as pa
|
||||
from configs import cfg_manager
|
||||
@@ -31,7 +32,7 @@ class DatabaseManager:
|
||||
|
||||
# 初始化数据库与表格
|
||||
self.db = lancedb.connect(db_path)
|
||||
if "default" not in self.db.table_names():
|
||||
if "default" not in self.db.list_tables().tables:
|
||||
self.table = self.db.create_table("default", schema=db_schema)
|
||||
else:
|
||||
self.table = self.db.open_table("default")
|
||||
|
||||
Reference in New Issue
Block a user