| # This is a simple Gradio app that displays the installed version of Python. | |
| import gradio as gr | |
| import sys | |
| # Define a function that returns the Python version. | |
| def get_python_version(): | |
| return sys.version | |
| # Create a Gradio interface that displays the Python version. | |
| with gr.Blocks() as demo: | |
| gr.Markdown(get_python_version) | |
| # Launch the interface. | |
| if __name__ == "__main__": | |
| demo.launch(show_error=True) |