From 93ecad3223e580101c1497966e43884c5177a5c2 Mon Sep 17 00:00:00 2001 From: procrastimax Date: Sat, 17 Jun 2023 16:00:36 +0200 Subject: [PATCH] Adds python-version file --- .python-version | 1 + app.py | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 .python-version create mode 100644 app.py diff --git a/.python-version b/.python-version new file mode 100644 index 0000000..371cfe3 --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.11.1 diff --git a/app.py b/app.py new file mode 100644 index 0000000..9ad8775 --- /dev/null +++ b/app.py @@ -0,0 +1,17 @@ +from shiny import App, render, ui + +app_ui = ui.page_fluid( + ui.h2("Hello Shiny!"), + ui.input_slider("n", "N", 0, 100, 20), + ui.output_text_verbatim("txt"), +) + + +def server(input, output, session): + @output + @render.text + def txt(): + return f"n*2 is {input.n() * 2}" + + +app = App(app_ui, server)