start_server.py
app.py
from beam import Image, Pod streamlit_server = Pod( image=Image().add_python_packages(["streamlit", "pandas", "altair", "requests"]), ports=[8501], # Default port for streamlit cpu=1, memory=1024, entrypoint=["streamlit", "run", "app.py"], ) res = streamlit_server.create() print("✨ Streamlit server hosted at:", res.url)
python start_server.py
=> Creating container => Container created successfully ===> pod-15fba0c6-3fe8-408e-a0f8-c99cf166dcc9-97b6207e => Invocation details curl -X GET 'https://15fba0c6-3fe8-408e-a0f8-c99cf166dcc9-8888.app.beam.cloud' \ -H 'Connection: keep-alive' \ -H 'Content-Type: application/json' \ -d '{}'
Was this page helpful?