mirror of
https://github.com/bellingcat/whisperbox-transcribe.git
synced 2026-06-08 03:28:35 +03:00
feat: add language detection task
This commit is contained in:
@@ -19,11 +19,8 @@ SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
|
||||
|
||||
|
||||
def get_session() -> Generator[Session, None, None]:
|
||||
db: Session = SessionLocal()
|
||||
session: Session = SessionLocal()
|
||||
try:
|
||||
yield db
|
||||
db.commit()
|
||||
except Exception:
|
||||
db.rollback()
|
||||
yield session
|
||||
finally:
|
||||
db.close()
|
||||
session.close()
|
||||
|
||||
Reference in New Issue
Block a user