-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.py
33 lines (28 loc) · 1.07 KB
/
app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import inputs
import globales
import funciones
import sulkuFront
import autorizador
import gradio as gr
def iniciar():
app_path = globales.app_path
main.queue(max_size=globales.max_size)
main.launch(auth=autorizador.authenticate, root_path=app_path, server_port=globales.server_port)
#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)
btn_buy = gr.Button("Get Credits", visible=False, size='lg')
#Customizable Inputs and Outputs
input1, input2, result = inputs.inputs_selector(globales.seto)
with gr.Blocks(theme=globales.tema, css="footer {visibility: hidden}") as main:
#Cargado en Load: Función, input, output
main.load(sulkuFront.precarga, None, html_credits)
with gr.Row():
demo = gr.Interface(
fn=funciones.perform,
inputs=[input1, input2],
outputs=[result, lbl_console, html_credits, btn_buy],
flagging_mode=globales.flag
)
iniciar()