Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
fix operator::
Browse files
app.py
CHANGED
@@ -214,7 +214,7 @@ class Sort(str, Enum):
|
|
214 |
def get_page(page: int = 1, sort: Sort = Sort.trending):
|
215 |
page = page if page > 0 else 1
|
216 |
if sort == Sort.trending:
|
217 |
-
sort_query = "json_extract(data, '$.likes') /
|
218 |
elif sort == Sort.recent:
|
219 |
sort_query = "datetime(json_extract(data, '$.lastModified')) DESC"
|
220 |
elif sort == Sort.likes:
|
|
|
214 |
def get_page(page: int = 1, sort: Sort = Sort.trending):
|
215 |
page = page if page > 0 else 1
|
216 |
if sort == Sort.trending:
|
217 |
+
sort_query = "json_extract(data, '$.likes') / POW((JULIANDAY('now') - JULIANDAY(datetime(json_extract(data, '$.lastModified')))) + 2, 2) DESC"
|
218 |
elif sort == Sort.recent:
|
219 |
sort_query = "datetime(json_extract(data, '$.lastModified')) DESC"
|
220 |
elif sort == Sort.likes:
|