Download scripts/seed_bottom.py from Mohansree/bsure-api: direct link, hf CLI and curl.
- Browser
- Download file 497 Bytes
-
https://huggingface.co/spaces/Mohansree/bsure-api/resolve/main/scripts/seed_bottom.py
- Command line
-
hf download hf://spaces/Mohansree/bsure-api/scripts/seed_bottom.py
-
curl -L -o seed_bottom.py https://huggingface.co/spaces/Mohansree/bsure-api/resolve/main/scripts/seed_bottom.py
497 Bytes
| from sqlmodel import Session, create_engine | |
| from models import WardrobeItem | |
| from database import engine | |
| def seed_bottom(): | |
| with Session(engine) as session: | |
| item = WardrobeItem( | |
| owner_id=1, | |
| image_url="/static/uploads/dummy_jeans.jpg", | |
| category="bottom", | |
| tags="Denim Jeans, Blue, Casual" | |
| ) | |
| session.add(item) | |
| session.commit() | |
| print(f"Seeded Bottom: {item.id}") | |
| if __name__ == "__main__": | |
| seed_bottom() | |