ThomasSimonini HF staff commited on
Commit
0c05807
1 Parent(s): 94b9645

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -256,6 +256,7 @@ def certification(hf_username, first_name, last_name):
256
 
257
  certificate, message, pdf = verify_certification(results_certification, hf_username, first_name, last_name)
258
  print("MESSAGE", message)
 
259
  return message, pdf, certificate, df
260
 
261
  """
@@ -392,10 +393,12 @@ with gr.Blocks() as demo:
392
  last_name = gr.Textbox(placeholder="Doe", label="Your Last Name")
393
  #email = gr.Textbox(placeholder="jane.doe@gmail.com", label="Your Email (to receive your certificate)")
394
  check_progress_button = gr.Button(value="Check if I pass")
395
- check_progress_button.click(fn=certification, inputs=[hf_username, first_name, last_name], outputs=[output_text, output_pdf, output_img, output_dataframe])#[output1, output2])
396
  output_text = gr.components.Textbox()
397
  output_pdf = gr.File()
398
  output_img = gr.components.Image(type="pil")
399
  output_dataframe = gr.components.Dataframe(headers=["Pass?", "Unit", "Environment", "Baseline", "Your best result", "Your best model id"], datatype=["markdown", "markdown", "markdown", "number", "number", "markdown", "bool"]) #value= certification(hf_username, first_name, last_name),
 
 
400
 
401
  demo.launch(debug=True)
 
256
 
257
  certificate, message, pdf = verify_certification(results_certification, hf_username, first_name, last_name)
258
  print("MESSAGE", message)
259
+
260
  return message, pdf, certificate, df
261
 
262
  """
 
393
  last_name = gr.Textbox(placeholder="Doe", label="Your Last Name")
394
  #email = gr.Textbox(placeholder="jane.doe@gmail.com", label="Your Email (to receive your certificate)")
395
  check_progress_button = gr.Button(value="Check if I pass")
396
+ #with gr.Row(visible=False) as output_row:
397
  output_text = gr.components.Textbox()
398
  output_pdf = gr.File()
399
  output_img = gr.components.Image(type="pil")
400
  output_dataframe = gr.components.Dataframe(headers=["Pass?", "Unit", "Environment", "Baseline", "Your best result", "Your best model id"], datatype=["markdown", "markdown", "markdown", "number", "number", "markdown", "bool"]) #value= certification(hf_username, first_name, last_name),
401
+ check_progress_button.click(fn=certification, inputs=[hf_username, first_name, last_name], outputs=[output_text, output_pdf, output_img, output_dataframe])#[output1, output2])
402
+
403
 
404
  demo.launch(debug=True)