capradeepgujaran commited on
Commit
6836297
·
verified ·
1 Parent(s): 3599c67

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -112,7 +112,8 @@ with gr.Blocks() as iface:
112
 
113
  use_chat = gr.Checkbox(label="Use Chat for TTS input", value=False)
114
 
115
- with gr.Group() as chat_group:
 
116
  chat_input = gr.Textbox(label="Ask a question about the indexed text")
117
  chat_button = gr.Button("Ask")
118
  chat_output = gr.Textbox(label="Answer", interactive=False)
@@ -125,7 +126,7 @@ with gr.Blocks() as iface:
125
  message_output = gr.Textbox(label="Message")
126
 
127
  def update_chat_visibility(use_chat):
128
- return gr.Group.update(visible=use_chat)
129
 
130
  def convert_text(text, translation_lang):
131
  target_code = translation_languages[translation_lang]
 
112
 
113
  use_chat = gr.Checkbox(label="Use Chat for TTS input", value=False)
114
 
115
+ chat_group = gr.Group(visible=False)
116
+ with chat_group:
117
  chat_input = gr.Textbox(label="Ask a question about the indexed text")
118
  chat_button = gr.Button("Ask")
119
  chat_output = gr.Textbox(label="Answer", interactive=False)
 
126
  message_output = gr.Textbox(label="Message")
127
 
128
  def update_chat_visibility(use_chat):
129
+ return gr.update(visible=use_chat)
130
 
131
  def convert_text(text, translation_lang):
132
  target_code = translation_languages[translation_lang]