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
I have a seven columns' dataframe, and the final column is html style selection component.
When I select the value in such column, change event cannot be detected.
Have you searched existing issues? 🔎
I have searched and found no existing issues
Reproduction
importgradioasgrdef__correct__(row):
return"""<select> <option value='0' selected>Unknown</option> <option value='1'>NASR</option> <option value='2'>Microsoft</option> <option value='3'>Reference</option> </select>"""defload_file(src_full_path_name):
df=pd.read_csv(src_full_path_name)
df['Correct'] =df['Correct'].apply(__correct__)
returngr.Dataframe(value=df, type="pandas", datatype='html',
max_height=750, interactive=True, show_label=False,
render=True, visible=True, label='table')
defcapture_edited_data(dataframe):
iflen(dataframe) ==0:
returngr.update()
# This is not be called, when I select different valueswithgr.Blocks() asdemo:
source_file=gr.Dropdown(label="Choose one File", multiselect=False, elem_id='source_file')
load_btn=gr.Button("Load", elem_id="load_btn", interactive=True)
table_output=gr.Dataframe(row_count=1, col_count=7, label="table", show_label=False)
table_output.change(fn=capture_edited_data, inputs=table_output, outputs=[])
load_btn.click(fn=load_file, inputs=[source_file], outputs=[table_output])
if__name__=='__main__':
demo.launch(server_name='localhost',
server_port=54321,
share=False, debug=True)
Describe the bug
I have a seven columns' dataframe, and the final column is html style selection component.
When I select the value in such column, change event cannot be detected.
Have you searched existing issues? 🔎
Reproduction
Screenshot
No response
Logs
System Info
Severity
Blocking usage of gradio
The text was updated successfully, but these errors were encountered: