From 65808362d0b372af9e14f19a178343dffb29f2d2 Mon Sep 17 00:00:00 2001 From: Moibe Date: Sun, 24 Nov 2024 23:57:30 -0600 Subject: [PATCH] InitAPI dettached --- .gitignore | 3 +- app.py | 4 +- autorizador.py | 7 +- .../__pycache__/globales.cpython-310.pyc | Bin 296 -> 0 bytes configuracion/splashmix.py | 2 +- funciones.py | 8 +- globales.py | 2 +- sulkuFront.py | 78 ++++++++---------- tools.py | 50 +++++------ 9 files changed, 78 insertions(+), 76 deletions(-) delete mode 100644 configuracion/__pycache__/globales.cpython-310.pyc diff --git a/.gitignore b/.gitignore index a825016..43c968d 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,5 @@ bridges.py /images/positions/ /data/__pycache__/ /configuracion/__pycache__/ -/flagged/ \ No newline at end of file +/flagged/ +**/__pycache__/ \ No newline at end of file diff --git a/app.py b/app.py index 0408b4a..0f3f99c 100644 --- a/app.py +++ b/app.py @@ -12,7 +12,7 @@ def iniciar(): #INTERFAZ #Credit Related Elements html_credits = gr.HTML(visible=True) -lbl_console = gr.Label(label="AI Terminal " + globales.version + " messages", value="AI Engine ready...", container=True) +lbl_console = gr.Label(label="AI Terminal " + globales.version + " messages", value="", container=True) btn_buy = gr.Button("Get Credits", visible=False, size='lg') #Customizable Inputs and Outputs @@ -20,7 +20,7 @@ def iniciar(): with gr.Blocks(theme=globales.tema, css="footer {visibility: True}") as main: #Cargado en Load: Función, input, output - main.load(sulkuFront.precarga, None, [lbl_console, html_credits]) + main.load(sulkuFront.precarga, None, html_credits) #main.load(sulkuFront.precarga, None, [lbl_console, html_credits]) with gr.Row(): diff --git a/autorizador.py b/autorizador.py index 6beb857..7c5581d 100644 --- a/autorizador.py +++ b/autorizador.py @@ -1,12 +1,15 @@ import ast import globales import sulkuPypi +import sulkuFront +import gradio as gr +import tools def authenticate(username, password): cadena_usuarios = sulkuPypi.getData(globales.aplicacion) - lista_usuarios = ast.literal_eval(cadena_usuarios) - + lista_usuarios = ast.literal_eval(cadena_usuarios) for u, p in lista_usuarios: if username == u and password == p: + tools.initAPI() return True return False \ No newline at end of file diff --git a/configuracion/__pycache__/globales.cpython-310.pyc b/configuracion/__pycache__/globales.cpython-310.pyc deleted file mode 100644 index 9ad4a92ee7adeef4fc142870b317829190ef1b77..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 296 zcmYjN!D_=W47HPtWrf0a+ZPOa=suu~(L)bAwTJFx48gHA*UYnmoMh~i_Di|$A9mPj zcA!uRJv|AbCxpx8f+hQX*xHse_LGZCOFgzt5$_WiCUS7YMFE8