Spaces:
Running
Running
Muennighoff
commited on
Commit
•
4dd6c9a
1
Parent(s):
76bacb9
Support safetensors
Browse files
app.py
CHANGED
@@ -820,6 +820,10 @@ def get_dim_seq_size(model):
|
|
820 |
size = json.load(open(index_path))
|
821 |
if ("metadata" in size) and ("total_size" in size["metadata"]):
|
822 |
size = round(size["metadata"]["total_size"] / 1e9, 2)
|
|
|
|
|
|
|
|
|
823 |
return dim, seq, size
|
824 |
|
825 |
def make_datasets_clickable(df):
|
|
|
820 |
size = json.load(open(index_path))
|
821 |
if ("metadata" in size) and ("total_size" in size["metadata"]):
|
822 |
size = round(size["metadata"]["total_size"] / 1e9, 2)
|
823 |
+
elif "model.safetensors" in filenames:
|
824 |
+
url = hf_hub_url(model.modelId, filename="model.safetensors")
|
825 |
+
meta = get_hf_file_metadata(url)
|
826 |
+
size = round(meta.size / 1e9, 2)
|
827 |
return dim, seq, size
|
828 |
|
829 |
def make_datasets_clickable(df):
|