Spaces:
Runtime error
Runtime error
Download multiapp.py from shamim237/python-dev-task-skyranko: direct link, hf CLI and curl.
- Browser
- Download file 392 Bytes
-
https://huggingface.co/spaces/shamim237/python-dev-task-skyranko/resolve/main/multiapp.py
- Command line
-
hf download hf://spaces/shamim237/python-dev-task-skyranko/multiapp.py
-
curl -L -o multiapp.py https://huggingface.co/spaces/shamim237/python-dev-task-skyranko/resolve/main/multiapp.py
392 Bytes
| import streamlit as st | |
| class MultiApp: | |
| def __init__(self): | |
| self.apps = [] | |
| def add_app(self, title, func): | |
| self.apps.append({ | |
| "title": title, | |
| "function": func | |
| }) | |
| def run(self): | |
| app = st.selectbox( | |
| 'Choose one', | |
| self.apps, | |
| format_func=lambda app: app['title']) | |
| app['function']() |