Spaces:
Runtime error
Runtime error
Download models/models.py from cloudaiRambo/cloudairambo: direct link, hf CLI and curl.
- Browser
- Download file 571 Bytes
-
https://huggingface.co/spaces/cloudaiRambo/cloudairambo/resolve/main/models/models.py
- Command line
-
hf download hf://spaces/cloudaiRambo/cloudairambo/models/models.py
-
curl -L -o models.py https://huggingface.co/spaces/cloudaiRambo/cloudairambo/resolve/main/models/models.py
571 Bytes
| # models/models.py | |
| from tortoise import fields | |
| from tortoise.models import Model | |
| class AdminUser(Model): | |
| id = fields.IntField(pk=True) | |
| username = fields.CharField(max_length=100, unique=True) | |
| password = fields.CharField(max_length=200) # hashed later | |
| class Meta: | |
| table = "admin_users" | |
| class UsageStat(Model): | |
| id = fields.IntField(pk=True) | |
| tool_name = fields.CharField(max_length=200) | |
| usage_count = fields.IntField(default=0) | |
| last_used_at = fields.DatetimeField(auto_now=True) | |
| class Meta: | |
| table = "usage_stats" | |