Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
feat: update the functions
Browse files
src/display/formatting.py
CHANGED
|
@@ -2,9 +2,11 @@ def model_hyperlink(link, model_name):
|
|
| 2 |
return f'<a target="_blank" href="{link}" style="color: var(--link-text-color); text-decoration: underline;text-decoration-style: dotted;">{model_name}</a>'
|
| 3 |
|
| 4 |
|
| 5 |
-
def make_clickable_model(model_name):
|
| 6 |
-
link = f"https://huggingface.co/{model_name}"
|
| 7 |
-
|
|
|
|
|
|
|
| 8 |
|
| 9 |
|
| 10 |
def styled_error(error):
|
|
|
|
| 2 |
return f'<a target="_blank" href="{link}" style="color: var(--link-text-color); text-decoration: underline;text-decoration-style: dotted;">{model_name}</a>'
|
| 3 |
|
| 4 |
|
| 5 |
+
def make_clickable_model(model_name: str, model_link: str):
|
| 6 |
+
# link = f"https://huggingface.co/{model_name}"
|
| 7 |
+
if not model_link.startswith("https://"):
|
| 8 |
+
return model_name
|
| 9 |
+
return model_hyperlink(model_link, model_name)
|
| 10 |
|
| 11 |
|
| 12 |
def styled_error(error):
|