Update hub-stats.py
Browse files- hub-stats.py +5 -1
hub-stats.py
CHANGED
|
@@ -144,6 +144,10 @@ def process_dataframe(df, endpoint):
|
|
| 144 |
None
|
| 145 |
)
|
| 146 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 147 |
for col in ["cardData", "config", "gguf"]:
|
| 148 |
if col in df.columns:
|
| 149 |
df[col] = df[col].apply(to_json_string)
|
|
@@ -239,7 +243,7 @@ async def create_parquet_files(skip_upload=False):
|
|
| 239 |
created_files.append(output_file)
|
| 240 |
|
| 241 |
print(f"✓ {endpoint}: {len(df):,} rows -> {output_file}")
|
| 242 |
-
|
| 243 |
if not skip_upload:
|
| 244 |
upload_to_hub(output_file)
|
| 245 |
|
|
|
|
| 144 |
None
|
| 145 |
)
|
| 146 |
|
| 147 |
+
# Handle gated column - convert to string to handle mixed types
|
| 148 |
+
if "gated" in df.columns:
|
| 149 |
+
df["gated"] = df["gated"].astype(str)
|
| 150 |
+
|
| 151 |
for col in ["cardData", "config", "gguf"]:
|
| 152 |
if col in df.columns:
|
| 153 |
df[col] = df[col].apply(to_json_string)
|
|
|
|
| 243 |
created_files.append(output_file)
|
| 244 |
|
| 245 |
print(f"✓ {endpoint}: {len(df):,} rows -> {output_file}")
|
| 246 |
+
|
| 247 |
if not skip_upload:
|
| 248 |
upload_to_hub(output_file)
|
| 249 |
|