INNER CODE UNIT · Python
get_task_options
underneathall/pinferencia · pinferencia/frontend/app.py:64
def get_task_options(self) -> list:
task_options = []
task_options += BUILT_IN_TASKS
if self.custom_templates:
task_options += list(self.custom_templates.keys())
return task_options
def get_models(self) -> list:
warning_container = st.empty()
error = None
for i in range(10):
warning_container.info(
f"Backend is starting. Connecting to backend, attempt: {i + 1} / 10"
)
try:
models = [m["name"] for m in self.model_manager.list()]
warning_container.empty()
return models