Moibe commited on
Commit
24b09fe
1 Parent(s): 2e4eff2

State states

Browse files
Files changed (1) hide show
  1. app.py +1 -23
app.py CHANGED
@@ -62,31 +62,12 @@ def perform(input1, input2):
62
 
63
  return path, info_window, html_credits, btn_buy
64
 
65
- def click_buy():
66
-
67
- print("Ejecutando change...")
68
-
69
- nuevo_markdown = """
70
-
71
- """
72
-
73
- return nuevo_markdown
74
-
75
  def display_tokens():
76
 
77
  print("Ejecutando display_tokens, tienes: ", gr.State.tokens)
78
-
79
  display = tools.actualizar_creditos(gr.State.tokens)
80
-
81
  return display
82
 
83
- #LOCAL VARIABLES
84
- # gr.State.usuario = "briggsboardman"
85
- # Capsule es el usuario encriptado que enviarás a la API de Sulku.
86
- # capsule = encrypter.encripta(gr.State.usuario).decode("utf-8") #decode es para quitarle el 'b
87
- # gr.State.capsule = capsule
88
- # gr.State.tokens = 20
89
-
90
  #Inputs
91
  source_image = gr.Image(label="Source")
92
  destination_image = gr.Image(label="Destination")
@@ -99,7 +80,6 @@ txt_credits = gr.Textbox(label="Credits Available", value="", interactive=False)
99
  html_credits = gr.HTML()
100
  lbl_console = gr.Label(label="AI Terminal Messages", value="AI Engine ready...", container=True)
101
  btn_buy = gr.Button("Buy More", visible=False, size='lg')
102
- #btn_buy.click(fn=click_buy, outputs=mrk_title)
103
 
104
  #Gradio themes:
105
  # — gr.themes.Base()
@@ -112,7 +92,6 @@ btn_buy = gr.Button("Buy More", visible=False, size='lg')
112
  valor = ""
113
 
114
  with gr.Blocks(theme=gr.themes.Base(), css="footer {visibility: hidden}") as main:
115
-
116
  #Función, input, output
117
  main.load(display_tokens, None, html_credits )
118
 
@@ -124,6 +103,5 @@ with gr.Blocks(theme=gr.themes.Base(), css="footer {visibility: hidden}") as mai
124
  inputs=[source_image, destination_image],
125
  outputs=[result_image, lbl_console, html_credits, btn_buy],
126
  allow_flagging='never'
127
- )
128
-
129
  main.launch(auth=auth.authenticate)
 
62
 
63
  return path, info_window, html_credits, btn_buy
64
 
 
 
 
 
 
 
 
 
 
 
65
  def display_tokens():
66
 
67
  print("Ejecutando display_tokens, tienes: ", gr.State.tokens)
 
68
  display = tools.actualizar_creditos(gr.State.tokens)
 
69
  return display
70
 
 
 
 
 
 
 
 
71
  #Inputs
72
  source_image = gr.Image(label="Source")
73
  destination_image = gr.Image(label="Destination")
 
80
  html_credits = gr.HTML()
81
  lbl_console = gr.Label(label="AI Terminal Messages", value="AI Engine ready...", container=True)
82
  btn_buy = gr.Button("Buy More", visible=False, size='lg')
 
83
 
84
  #Gradio themes:
85
  # — gr.themes.Base()
 
92
  valor = ""
93
 
94
  with gr.Blocks(theme=gr.themes.Base(), css="footer {visibility: hidden}") as main:
 
95
  #Función, input, output
96
  main.load(display_tokens, None, html_credits )
97
 
 
103
  inputs=[source_image, destination_image],
104
  outputs=[result_image, lbl_console, html_credits, btn_buy],
105
  allow_flagging='never'
106
+ )
 
107
  main.launch(auth=auth.authenticate)