You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ yes] I have searched to see if a similar issue already exists.
Is your feature request related to a problem? Please describe.
I would like to implement in my application that after filling out a form and clicking the button to submit, it switches to a new Tab and displays the contents of my form, but I've checked the API and asked OPENAI and both tell me that I can't do this
Describe the solution you'd like
with gr.Column(scale=100): # If the component is drawn under a layout element, it will be displayed according to the layout element's rules
gr.Markdown('# Here is column 1')
with gr.Tab(label='test1') as tab1_col.
chatbot = gr.Chatbot().style(height=400)
status = gr.Markdown()
with gr.Tab(label='test2', id='tab2') as tab2_col.
chatbot2 = gr.Chatbot().style(height=400)
status2 = gr.Markdown()
with gr.Column(scale=30, elem_id='xixi').
# gr.Markdown('# Here is column 2')
i_say = gr.Textbox()
submit = gr.Button(value='submit', variant='primary')
switch = gr.Button(value='submit', variant='stop', elem_id='switch_button')
with gr.
you_say = gr.Textbox(show_label=False, placeholder='No output box of any use')
Noo = gr.Button(value='No button of any use')
demo as above, I want the page to switch from gr.Tab(label='test1') to gr.Tab(label='test2' after clicking the switch button and show my submitted content (trigger) the select event of tab2_col
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered:
Kilig947
changed the title
疑问请求:Gradio 是否允许在Button的click函数中绑定一个点击另外的组件事件?
Query request: Does Gradio allow to bind a click on another component event in the click function of a Button?
Jun 3, 2023
Hi @Kilig947 yes, you can submit your form and then update the selected tab by returning gr.Tabs.update(select=) from your function. You can see an example of this here: #2412 (comment)
Is your feature request related to a problem? Please describe.
I would like to implement in my application that after filling out a form and clicking the button to submit, it switches to a new Tab and displays the contents of my form, but I've checked the API and asked OPENAI and both tell me that I can't do this
Describe the solution you'd like
with gr.Column(scale=100): # If the component is drawn under a layout element, it will be displayed according to the layout element's rules
gr.Markdown('# Here is column 1')
with gr.Tab(label='test1') as tab1_col.
chatbot = gr.Chatbot().style(height=400)
status = gr.Markdown()
with gr.Tab(label='test2', id='tab2') as tab2_col.
chatbot2 = gr.Chatbot().style(height=400)
status2 = gr.Markdown()
demo as above, I want the page to switch from gr.Tab(label='test1') to gr.Tab(label='test2' after clicking the switch button and show my submitted content (trigger) the select event of tab2_col
Translated with www.DeepL.com/Translator (free version)
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: