This commit is contained in:
Oleh Omelchenko
2024-06-20 00:54:13 +03:00
commit dc660f481c
6 changed files with 58 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
venv/

1
.python-version Normal file
View File

@@ -0,0 +1 @@
3.11

35
Makefile Normal file
View File

@@ -0,0 +1,35 @@
# Define the virtual environment directory
VENV_DIR = venv
# Define the requirements file
REQUIREMENTS_FILE = requirements.txt
# Create the virtual environment
$(VENV_DIR):
python3 -m venv $(VENV_DIR)
# Activate the virtual environment and install requirements
.PHONY: install
install: $(VENV_DIR)
$(VENV_DIR)/bin/pip install --upgrade pip
$(VENV_DIR)/bin/pip install -r $(REQUIREMENTS_FILE)
# Clean the virtual environment
.PHONY: clean
clean:
rm -rf $(VENV_DIR)
# Run a command inside the virtual environment
.PHONY: run
run:
$(VENV_DIR)/bin/python -m some_module
# Example of running a script inside the virtual environment
.PHONY: run-script
run-script:
$(VENV_DIR)/bin/python script.py
# Run a Streamlit app inside the virtual environment
.PHONY: run-streamlit
run-streamlit:
$(VENV_DIR)/bin/streamlit run app.py --server.address=127.0.0.1

5
app.py Normal file
View File

@@ -0,0 +1,5 @@
import streamlit as st
st.markdown("# Hello World")

15
readme.md Normal file
View File

@@ -0,0 +1,15 @@
## Demo of Streamlit interactive dashboard
to install dependencies:
```
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
```
to run locally:
```
streamlit run app.py --server.address=127.0.0.1
```

1
requirements.txt Normal file
View File

@@ -0,0 +1 @@
streamlit