mirror of
https://github.com/oobabooga/textgen.git
synced 2026-07-23 11:20:54 -05:00
Minor fixes
This commit is contained in:
@@ -142,7 +142,7 @@ def _render_web_search_body(body):
|
||||
for r in results:
|
||||
title = html.escape(r['title'])
|
||||
url = r['url']
|
||||
snippet = html.escape(r.get('snippet', ''))
|
||||
snippet = html.escape(r.get('snippet') or '')
|
||||
if url.lower().startswith(('http://', 'https://')):
|
||||
link = f'<a class="web-search-title" href="{html.escape(url)}" target="_blank" rel="noopener noreferrer">{title}</a>'
|
||||
else:
|
||||
|
||||
@@ -211,7 +211,8 @@ def is_mmproj_file(name):
|
||||
|
||||
def find_sibling_mmproj(model_path):
|
||||
"""Return an mmproj path relative to model_dir when exactly one mmproj file
|
||||
sits next to the model in a subfolder of model_dir (any depth, not root).
|
||||
sits in the same folder as the model, provided that folder is a subfolder
|
||||
of model_dir (not model_dir itself).
|
||||
"""
|
||||
try:
|
||||
model_path = Path(model_path)
|
||||
|
||||
Reference in New Issue
Block a user