Moibe commited on
Commit
36e717b
1 Parent(s): c167925

Work catalogue

Browse files
Files changed (2) hide show
  1. app.py +6 -1
  2. avaimet.py +2 -1
app.py CHANGED
@@ -17,6 +17,11 @@ def getAccess(userfile):
17
 
18
  def debitTokens(userfile, work):
19
 
 
 
 
 
 
20
  #Genera conexi贸n inicial.
21
  sshListo, sftpListo = avaimet.conecta()
22
  #Obtiene la caja donde est谩 guardados los tokens.
@@ -37,7 +42,7 @@ with gr.Blocks() as demo:
37
  text_input = gr.Textbox()
38
  work_catalogue = gr.Dropdown(
39
  ["picswap", "dog", "bird"], label="Catalogo", info="Will add more works later!"
40
- ),
41
  access_btn = gr.Button(value="Submit")
42
  debit_btn = gr.Button(value="Debit")
43
  with gr.Column():
 
17
 
18
  def debitTokens(userfile, work):
19
 
20
+ print("Llegu茅 a debitTokens...")
21
+ time.sleep(8)
22
+
23
+ print(f"Y work recibido es : {work} y es del tipo: {type(work)} ...")
24
+
25
  #Genera conexi贸n inicial.
26
  sshListo, sftpListo = avaimet.conecta()
27
  #Obtiene la caja donde est谩 guardados los tokens.
 
42
  text_input = gr.Textbox()
43
  work_catalogue = gr.Dropdown(
44
  ["picswap", "dog", "bird"], label="Catalogo", info="Will add more works later!"
45
+ )
46
  access_btn = gr.Button(value="Submit")
47
  debit_btn = gr.Button(value="Debit")
48
  with gr.Column():
avaimet.py CHANGED
@@ -59,7 +59,8 @@ def restaToken(sftp, caja, tokens, work):
59
  print(f"Work: {work}, cuantos: {cuantos}")
60
  time.sleep(3)
61
  else:
62
- cuantos = 1
 
63
 
64
  # Agregar el texto "- Revisado." al string
65
  contenido_final = int(tokens) - cuantos
 
59
  print(f"Work: {work}, cuantos: {cuantos}")
60
  time.sleep(3)
61
  else:
62
+ print("El trabajo no existe...")
63
+
64
 
65
  # Agregar el texto "- Revisado." al string
66
  contenido_final = int(tokens) - cuantos