Commit
β’
1f35814
1
Parent(s):
cb34ad1
Create utils.py
Browse files
utils.py
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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>'
|
9 |
+
|
10 |
+
def pass_emoji(passed):
|
11 |
+
if passed == True:
|
12 |
+
passed = "β
"
|
13 |
+
else:
|
14 |
+
passed = "β"
|