Deploy interactive machine learning apps and data dashboards using Streamlit on Akash Network's decentralized cloud.
Streamlit is an open-source Python library that lets you turn data scripts into shareable web apps in minutes — with no frontend experience required. It's the go-to tool for ML engineers and data scientists who want to:
- Demo machine learning models interactively
- Build data visualization dashboards
- Prototype and share AI-powered tools
- Create internal apps without writing HTML/CSS/JS
This template deploys a simple Streamlit application with two demo interfaces:
- Text Analysis — Mock sentiment analysis with confidence scoring
- Image Captioning — Mock image description generator with file upload
You can easily swap in your own models or logic by editing app.py.
- Go to console.akash.network
- Click Deploy → Build Your Template
- Upload the
deploy.yamlfile or use the one-click button above - Review resources and set your pricing bid
- Sign and deploy
- Access your Streamlit app at the provided URL on port 80
- Clone the repository:
git clone https://github.com/akash-network/awesome-akash.git
cd awesome-akash/streamlit-demo- Create the deployment:
akash tx deployment create deploy.yaml \
--from <your-wallet> \
--node https://rpc.akashnet.net:443 \
--chain-id akashnet-2- Accept a bid and create a lease, then fetch your deployment URL from the lease status.
Replace the demo functions in app.py with real ML logic. Example using HuggingFace Transformers:
import streamlit as st
from transformers import pipeline
@st.cache_resource
def load_model():
return pipeline("sentiment-analysis")
classifier = load_model()
st.title("Sentiment Analysis")
text = st.text_area("Enter text")
if st.button("Analyze"):
result = classifier(text)[0]
st.success(f"**{result['label']}** — {result['score']:.2%} confidence")Then build a custom Docker image with your dependencies and update the image: field in deploy.yaml.
Edit deploy.yaml to allocate more CPU or memory for heavier workloads:
resources:
cpu:
units: 2.0 # Increase for CPU-intensive models
memory:
size: 4Gi # Increase for larger models or datasets
storage:
size: 5Gi # Increase if loading model weights from diskTo run GPU-accelerated models, add a GPU resource block and use a CUDA-enabled base image:
resources:
cpu:
units: 4.0
memory:
size: 16Gi
storage:
size: 20Gi
gpu:
units: 1
attributes:
vendor:
nvidia:
- model: rtx3090| Service | Container Port | Exposed As |
|---|---|---|
| Streamlit | 8501 | 80 (HTTP) |
Typical cost on Akash: ~$5–15/month depending on provider and resource allocation — significantly cheaper than equivalent workloads on AWS, GCP, or Heroku.
- Deploy HuggingFace models for text generation, classification, or translation
- Build interactive dashboards for data exploration
- Share ML research demos without provisioning servers
- Host internal tools accessible from anywhere
- Akash Discord: discord.akash.network
- Streamlit Community: discuss.streamlit.io
