mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2026-01-28 03:14:43 +01:00
UI: Preload the instruct and chat fonts
This commit is contained in:
parent
8be798e15f
commit
2478294c06
|
|
@ -38,7 +38,6 @@ def my_get(url, **kwargs):
|
|||
return requests.api.request('get', 'http://127.0.0.1/', **kwargs)
|
||||
|
||||
|
||||
# Kindly provided by our friend WizardLM-30B
|
||||
def my_open(*args, **kwargs):
|
||||
filename = str(args[0])
|
||||
if filename.endswith(('index.html', 'share.html')):
|
||||
|
|
@ -52,6 +51,10 @@ def my_open(*args, **kwargs):
|
|||
file_contents = file_contents.replace('cdnjs.cloudflare.com', '127.0.0.1')
|
||||
file_contents = file_contents.replace(
|
||||
'</head>',
|
||||
'\n <link rel="preload" href="file/css/Inter/Inter-VariableFont_opsz,wght.ttf" as="font" type="font/ttf" crossorigin>'
|
||||
'\n <link rel="preload" href="file/css/Inter/Inter-Italic-VariableFont_opsz,wght.ttf" as="font" type="font/ttf" crossorigin>'
|
||||
'\n <link rel="preload" href="file/css/NotoSans/NotoSans-Regular.woff2" as="font" type="font/woff2" crossorigin>'
|
||||
'\n <link rel="preload" href="file/css/NotoSans/NotoSans-Italic.woff2" as="font" type="font/woff2" crossorigin>'
|
||||
'\n <script src="file/js/katex/katex.min.js"></script>'
|
||||
'\n <script src="file/js/katex/auto-render.min.js"></script>'
|
||||
'\n <script src="file/js/highlightjs/highlight.min.js"></script>'
|
||||
|
|
|
|||
Loading…
Reference in a new issue