Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
|
|
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,
|