mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-15 02:11:15 +08:00
9b42ba8f10
* changes * changes * revert changes * changes * add changeset * notebooks script * changes * changes --------- Co-authored-by: Ali Abid <aliabid94@gmail.com> Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>
20 lines
833 B
Python
20 lines
833 B
Python
import gradio as gr
|
|
|
|
with gr.Blocks() as demo:
|
|
with gr.Row():
|
|
with gr.Column():
|
|
input_3d = gr.Model3D(label="Input Model3D")
|
|
with gr.Column():
|
|
output_3d = gr.Model3D(label="Output Model3D")
|
|
with gr.Column():
|
|
num_change = gr.Number(label="# Change Events", value=0)
|
|
num_load = gr.Number(label="# Upload Events", value=0)
|
|
num_clear = gr.Number(label="# Clear Events", value=0)
|
|
clear_value = gr.Textbox(label="Clear Value", value="")
|
|
input_3d.upload(lambda s, n: (s, n + 1), [input_3d, num_load], [output_3d, num_load])
|
|
input_3d.change(lambda n: n + 1, num_change, num_change)
|
|
input_3d.clear(lambda s, n: (s, n + 1), [input_3d, num_clear], [clear_value, num_clear])
|
|
|
|
if __name__ == "__main__":
|
|
demo.launch()
|