ThomasSimonini HF staff commited on
Commit
1f35814
β€’
1 Parent(s): cb34ad1

Create utils.py

Browse files
Files changed (1) hide show
  1. utils.py +14 -0
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 = "❌"