Update app.py
Browse files
app.py
CHANGED
@@ -20,12 +20,6 @@ def model_choices():
|
|
20 |
model_description = {model['filename']: model['description'] for model in data_json}
|
21 |
|
22 |
|
23 |
-
def llm_intro(selected_model):
|
24 |
-
html_string = model_description.get(selected_model, "No description available for this model selection.")
|
25 |
-
formatted_description = html_string.replace("<ul>", "").replace("</ul>", "").replace("</li>", "").replace("<br>", "\n").replace("</br>", "").replace("<li>", "\n➤ ")
|
26 |
-
return formatted_description
|
27 |
-
|
28 |
-
|
29 |
def remove_endtags(html_string, tags):
|
30 |
"""Remove rear HTML tags from the input string."""
|
31 |
for tag in tags:
|
@@ -55,6 +49,11 @@ def format_html_string(html_string):
|
|
55 |
|
56 |
return formatted_string
|
57 |
|
|
|
|
|
|
|
|
|
|
|
58 |
|
59 |
# cache models for faster reloads
|
60 |
model_cache = {}
|
|
|
20 |
model_description = {model['filename']: model['description'] for model in data_json}
|
21 |
|
22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
def remove_endtags(html_string, tags):
|
24 |
"""Remove rear HTML tags from the input string."""
|
25 |
for tag in tags:
|
|
|
49 |
|
50 |
return formatted_string
|
51 |
|
52 |
+
|
53 |
+
def llm_intro(selected_model):
|
54 |
+
html_string = model_description.get(selected_model, "No description available for this model selection.")
|
55 |
+
formatted_description = format_html_string(html_string)
|
56 |
+
return formatted_description
|
57 |
|
58 |
# cache models for faster reloads
|
59 |
model_cache = {}
|