fixed errors

This commit is contained in:
Saifeddine ALOUI 2023-08-27 21:50:54 +02:00
parent a1e9e73011
commit 07c1183289
3 changed files with 16 additions and 5 deletions

11
app.py
View File

@ -939,10 +939,13 @@ class LoLLMsWebUI(LoLLMsAPPI):
def get_active_model(self):
if self.binding is not None:
models = self.binding.list_models(self.config)
index = models.index(self.config.model_name)
ASCIIColors.yellow("Listing models")
return jsonify({"model":models[index],"index":index})
try:
models = self.binding.list_models(self.config)
index = models.index(self.config.model_name)
ASCIIColors.yellow("Listing models")
return jsonify({"model":models[index],"index":index})
except Exception as ex:
return jsonify(None)
else:
return jsonify(None)

View File

@ -13,4 +13,12 @@ content: |
\chapter{Introduction}
@<generation_placeholder>@
\end{document}
```
```
snippets:
- Import graphics(required to add graphics to the page) :
\usepackage[demo]{graphic}
- Add graph: |
\includegraphics[width=4in]{@<Image name>@}% Replace with your own image path
help: |
Builds a latex code for a book