hisham-cmd commited on
Commit
7dffa10
·
verified ·
1 Parent(s): 2c5f0db

Delete tmp_get_cats.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. tmp_get_cats.py +0 -21
tmp_get_cats.py DELETED
@@ -1,21 +0,0 @@
1
-
2
- import os
3
- import sys
4
-
5
- # Add current directory to path so we can import 'app'
6
- sys.path.append(os.getcwd())
7
-
8
- from app.db.base import SessionLocal
9
- from app.models.product import Category
10
-
11
- def get_cats():
12
- db = SessionLocal()
13
- try:
14
- cats = db.query(Category).all()
15
- for cat in cats:
16
- print(f"{cat.id}:{cat.name_en}:{cat.parent_id}")
17
- finally:
18
- db.close()
19
-
20
- if __name__ == "__main__":
21
- get_cats()