Commit
·
e180a1f
1
Parent(s):
0e7a8c5
Create utils.py
Browse files
utils.py
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Based on Omar Sanseviero work
|
2 |
+
# Make model clickable link
|
3 |
+
def make_clickable_model(model_name):
|
4 |
+
# remove user from model name
|
5 |
+
model_name_show = ' '.join(model_name.split('/')[1:])
|
6 |
+
|
7 |
+
link = "https://huggingface.co/" + model_name
|
8 |
+
return f'<a target="_blank" href="{link}">{model_name_show}</a>'
|