Spaces:
Sleeping
Sleeping
Return State
Browse files
app.py
CHANGED
@@ -53,7 +53,7 @@ def perform(input1, input2):
|
|
53 |
else:
|
54 |
info_window = "Out of credits..."
|
55 |
path = 'no-result.png'
|
56 |
-
return path, info_window, btn_buy
|
57 |
|
58 |
print(f"El path final fue {path}, si es no-result, no debites y controla la info window.")
|
59 |
print(f"El type de path es: ", type(path))
|
@@ -81,7 +81,7 @@ def perform(input1, input2):
|
|
81 |
#No se hizo un proceso, por lo tanto no debitaremos.
|
82 |
#En el futuro, como regla de negocio, podría cambiar y que si debitemos.
|
83 |
|
84 |
-
return path, info_window, btn_buy
|
85 |
|
86 |
def click_buy():
|
87 |
|
@@ -135,7 +135,7 @@ with gr.Blocks(theme=gr.themes.Base(), css="footer {visibility: hidden}") as mai
|
|
135 |
fn=perform,
|
136 |
title="",
|
137 |
inputs=[source_image, destination_image],
|
138 |
-
outputs=[result_image, lbl_console, btn_buy],
|
139 |
)
|
140 |
|
141 |
main.launch(auth=authenticate)
|
|
|
53 |
else:
|
54 |
info_window = "Out of credits..."
|
55 |
path = 'no-result.png'
|
56 |
+
return path, info_window, btn_buy, gr.State.tokens
|
57 |
|
58 |
print(f"El path final fue {path}, si es no-result, no debites y controla la info window.")
|
59 |
print(f"El type de path es: ", type(path))
|
|
|
81 |
#No se hizo un proceso, por lo tanto no debitaremos.
|
82 |
#En el futuro, como regla de negocio, podría cambiar y que si debitemos.
|
83 |
|
84 |
+
return path, info_window, btn_buy, gr.State.tokens
|
85 |
|
86 |
def click_buy():
|
87 |
|
|
|
135 |
fn=perform,
|
136 |
title="",
|
137 |
inputs=[source_image, destination_image],
|
138 |
+
outputs=[result_image, lbl_console, btn_buy, lbl_credits],
|
139 |
)
|
140 |
|
141 |
main.launch(auth=authenticate)
|