Spaces:
Sleeping
Sleeping
Moibe
commited on
Commit
·
6d9d79f
1
Parent(s):
5fc62cc
deduct with param
Browse files
app.py
CHANGED
@@ -100,12 +100,11 @@ with gr.Blocks() as block:
|
|
100 |
tokens_total = gr.Text(label="Tokens Disponibles", interactive = True)
|
101 |
text_input = gr.Text(label="Tu Nombre:")
|
102 |
resultadoFinal = gr.Text(label="Resultado")
|
103 |
-
|
104 |
-
|
105 |
|
106 |
#text_input.change(None, tokens_label, tokens_label, js="(v)=>{ getStorage('text_input',v) }")
|
107 |
#tokens_label.change(None, tokens_total, None, _js="(v)=>{ setStorage('otro',v) }")
|
108 |
-
resultadoFinal.change(deduct,
|
109 |
|
110 |
#resultadoFinal.change(None, text_input, resultadoFinal, js="(v)=>{ getStorage('text_input') }")
|
111 |
btn = gr.Button("Enviar", icon="aiicon.png")
|
|
|
100 |
tokens_total = gr.Text(label="Tokens Disponibles", interactive = True)
|
101 |
text_input = gr.Text(label="Tu Nombre:")
|
102 |
resultadoFinal = gr.Text(label="Resultado")
|
103 |
+
|
|
|
104 |
|
105 |
#text_input.change(None, tokens_label, tokens_label, js="(v)=>{ getStorage('text_input',v) }")
|
106 |
#tokens_label.change(None, tokens_total, None, _js="(v)=>{ setStorage('otro',v) }")
|
107 |
+
resultadoFinal.change(deduct(99), None, tokens_total, _js="(v)=>{ setStorage('tokens', v) }")
|
108 |
|
109 |
#resultadoFinal.change(None, text_input, resultadoFinal, js="(v)=>{ getStorage('text_input') }")
|
110 |
btn = gr.Button("Enviar", icon="aiicon.png")
|