Santosh Sanjeev
commited on
Commit
·
56b3ee2
1
Parent(s):
cc52786
made changes
Browse files
app.py
CHANGED
|
@@ -512,6 +512,15 @@ for col, default in [("assigned_to",""),("status","todo")]:
|
|
| 512 |
df = df.with_columns(pl.col(col).fill_null(default))
|
| 513 |
df = df.sort(by=["downloads","last_modified","usedStorage"], descending=[True,True,True])
|
| 514 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 515 |
# Prepare dropdown unique values
|
| 516 |
unique_values = {col: sorted(df[col].drop_nulls().unique().to_list()) for col in DROPDOWN_COLUMNS}
|
| 517 |
unique_values["assigned_to"] = sorted(member_list)
|
|
@@ -692,7 +701,7 @@ with gr.Blocks() as demo:
|
|
| 692 |
)
|
| 693 |
|
| 694 |
# --- Auto-push ---
|
| 695 |
-
def auto_push_loop(interval=
|
| 696 |
while True:
|
| 697 |
try:
|
| 698 |
hf_token = os.environ.get("HF_TOKEN")
|
|
@@ -714,5 +723,5 @@ def auto_push_loop(interval=3600):
|
|
| 714 |
print("⚠️ Push failed:", e)
|
| 715 |
time.sleep(interval)
|
| 716 |
|
| 717 |
-
threading.Thread(target=auto_push_loop, args=(
|
| 718 |
demo.launch()
|
|
|
|
| 512 |
df = df.with_columns(pl.col(col).fill_null(default))
|
| 513 |
df = df.sort(by=["downloads","last_modified","usedStorage"], descending=[True,True,True])
|
| 514 |
|
| 515 |
+
|
| 516 |
+
if "reason" in df.columns:
|
| 517 |
+
df = df.with_columns([
|
| 518 |
+
pl.Series(
|
| 519 |
+
"reason",
|
| 520 |
+
["short description" if x and "short description" in x.lower() else (x if x is not None else "") for x in df["reason"]]
|
| 521 |
+
)
|
| 522 |
+
])
|
| 523 |
+
|
| 524 |
# Prepare dropdown unique values
|
| 525 |
unique_values = {col: sorted(df[col].drop_nulls().unique().to_list()) for col in DROPDOWN_COLUMNS}
|
| 526 |
unique_values["assigned_to"] = sorted(member_list)
|
|
|
|
| 701 |
)
|
| 702 |
|
| 703 |
# --- Auto-push ---
|
| 704 |
+
def auto_push_loop(interval=1200):
|
| 705 |
while True:
|
| 706 |
try:
|
| 707 |
hf_token = os.environ.get("HF_TOKEN")
|
|
|
|
| 723 |
print("⚠️ Push failed:", e)
|
| 724 |
time.sleep(interval)
|
| 725 |
|
| 726 |
+
threading.Thread(target=auto_push_loop, args=(1200,), daemon=True).start()
|
| 727 |
demo.launch()
|