rafaa commited on
Commit
06e7399
·
verified ·
1 Parent(s): ea57a92

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -125,7 +125,6 @@ def generate(
125
 
126
  return output
127
 
128
- # Adding a checkbox and password input to the Gradio interface
129
  checkbox = gr.Checkbox(label="Use Text-to-Speech")
130
  password_input = gr.Textbox("Password", type="password", placeholder="Enter password")
131
 
@@ -135,7 +134,8 @@ mychatbot = gr.Chatbot(
135
  demo = gr.ChatInterface(fn=generate,
136
  inputs=[
137
  gr.Textbox("User Input"),
138
- gr.Conditional(password_input, condition=lambda use_checkbox: use_checkbox),
 
139
  checkbox
140
  ],
141
  chatbot=mychatbot,
 
125
 
126
  return output
127
 
 
128
  checkbox = gr.Checkbox(label="Use Text-to-Speech")
129
  password_input = gr.Textbox("Password", type="password", placeholder="Enter password")
130
 
 
134
  demo = gr.ChatInterface(fn=generate,
135
  inputs=[
136
  gr.Textbox("User Input"),
137
+ # Fixed code for the conditional component
138
+ gr.Conditional(input=password_input, condition=lambda use_checkbox: use_checkbox),
139
  checkbox
140
  ],
141
  chatbot=mychatbot,