hltdx commited on
Commit
ca21449
·
unverified ·
1 Parent(s): 393b0ce

Adding password type textbox.

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -41,6 +41,7 @@ def delete_data(secret):
41
  else:
42
  return "No data found"
43
 
 
44
 
45
  # Create Gradio interface
46
  iface1 = gr.Interface(
@@ -52,14 +53,14 @@ iface1 = gr.Interface(
52
 
53
  iface2 = gr.Interface(
54
  fn=load_data,
55
- inputs="text",
56
  outputs="text",
57
  title="Load Data"
58
  )
59
 
60
  iface3 = gr.Interface(
61
  fn=delete_data,
62
- inputs="text",
63
  outputs="text",
64
  title="Delete Data"
65
  )
 
41
  else:
42
  return "No data found"
43
 
44
+ secret_input = gr.inputs.Textbox(label="Secret", type="password")
45
 
46
  # Create Gradio interface
47
  iface1 = gr.Interface(
 
53
 
54
  iface2 = gr.Interface(
55
  fn=load_data,
56
+ inputs=secret_input,
57
  outputs="text",
58
  title="Load Data"
59
  )
60
 
61
  iface3 = gr.Interface(
62
  fn=delete_data,
63
+ inputs=secret_input,
64
  outputs="text",
65
  title="Delete Data"
66
  )