Spaces:
Runtime error
Runtime error
Update app.py
Browse files6 unmodified lines78910111210131415166 unmodified lines232425232627282938 unmodified lines68697068697172737475762 unmodified lines79808178828384854 unmodified lines909192899091929393949596979819 unmodified lines11811912011912012112212312412520 unmodified lines1461471481471496 unmodified linesdropdown, js = create_theme_dropdown()
with gr.Blocks(theme='trimble/trimble_ai_theme') as demo:
gr.HTML("<img src=\"https://huggingface.co/spaces/trimble/trimble_ai_theme/resolve/main/images/logo.png\">")
with gr.Row().style(equal_height=True): with gr.Row(equal_height=True): with gr.Column(scale=10): gr.Markdown( """6 unmodified lines with gr.Column(scale=3): with gr.Box(): dropdown.render() toggle_dark = gr.Button(value="Toggle Dark").style(full_width=True) toggle_dark = gr.Button(value="Toggle Dark")
dropdown.change(None, dropdown, None, _js=js) toggle_dark.click(38 unmodified lines check = gr.Checkbox(label="Go") with gr.Column(variant="panel", scale=2): img = gr.Image( "https://gradio.app/assets/img/header-image.jpg", label="Image" ).style(height=320) "https://www.gradio.app/_app/immutable/assets/gradio.8a5e8876.svg", label="Image", height=320 )
with gr.Row(): go_btn = gr.Button("Go", label="Primary Button", variant="primary") clear_btn = gr.Button(2 unmodified lines
def go(*args): time.sleep(3) return "https://gradio.app/assets/img/header-image.jpg" return "https://www.gradio.app/_app/immutable/assets/gradio.8a5e8876.svg"
go_btn.click(go, [radio, drop, drop_2, check, name], img, api_name="go")
4 unmodified lines clear_btn.click(clear, None, img)
with gr.Row(): btn1 = gr.Button("Button 1").style(size="sm") btn2 = gr.UploadButton().style(size="sm") stop_btn = gr.Button("Stop", label="Stop Button", variant="stop").style( size="sm" ) btn1 = gr.Button("Button 1", size="sm") btn2 = gr.UploadButton(size="sm") stop_btn = gr.Button("Stop", label="Stop Button", variant="stop", size="sm")
with gr.Row(): gr.Dataframe(value=[[1, 2, 3], [4, 5, 6], [7, 8, 9]], label="Dataframe")19 unmodified lines "https://gradio-static-files.s3.us-west-2.amazonaws.com/tower.jpg", "tower", ), ] ).style(height="200px", grid=2) ], height="200px" )
with gr.Row(): with gr.Column(scale=2):20 unmodified lines
if __name__ == "__main__": demo.queue().launch() demo.queue().launch()app.py+15-13