Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# This is a simple Gradio app that displays the installed version of Python.
|
| 2 |
+
import gradio as gr
|
| 3 |
+
import sys
|
| 4 |
+
|
| 5 |
+
# Define a function that returns the Python version.
|
| 6 |
+
def get_python_version():
|
| 7 |
+
return sys.version
|
| 8 |
+
|
| 9 |
+
# Create a Gradio interface that displays the Python version.
|
| 10 |
+
with gr.Blocks() as demo:
|
| 11 |
+
gr.Markdown(get_python_version)
|
| 12 |
+
|
| 13 |
+
# Launch the interface.
|
| 14 |
+
if __name__ == "__main__":
|
| 15 |
+
demo.launch(show_error=True)
|