gradio/demo/code_component/run.py
Freddy Boulton 9d159be249
Add missing demos for Code and Barplot (#3550)
* Add missing demos

* Add code

* Linting

* Format notebook

* Remove extra print

* Update demo/barplot_component/run.py

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>

* Fix code component formatting

* Fix barplot

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-03-20 19:16:18 -04:00

20 lines
391 B
Python

import gradio as gr
css = (
"footer {display: none !important;} .gradio-container {min-height: 0px !important;}"
)
with gr.Blocks(css=css) as demo:
gr.Code(
value="""def hello_world():
return "Hello, world!"
print(hello_world())""",
language="python",
interactive=True,
show_label=False,
)
if __name__ == "__main__":
demo.launch()