streamlit

Streamlit on AWS: serverless options?

Streamlit on AWS: serverless options? Question: My goal is to deploy a Streamlit application to an AWS Serverless architecture. Streamlit does not appear to function properly without a Docker container, so the architecture would need to support containers. From various tutorials, EC2 is the most popular deployment option for Streamlit, which I have no interest …

Total answers: 1

Realtime data update to streamlit from python variable

Realtime data update to streamlit from python variable Question: New to python world. I am trying to understand how to update realtime data in streamlit app.(Reference Blog). I am looping through the numbers 1 to 100, display the number along with number * 10. But streamlit always shows number as 1. How can I update …

Total answers: 1

Reading binary file using numpy in Streamlit

Reading binary file using numpy in Streamlit Question: I have the following code snippet that works perfectly well in python, however, I am trying to use streamlit to upload the binary files, but I can’t seem to make it work. Here is the working code in python: def read_bin(): dt = np.dtype([(‘col1′,’d’),(‘col2′,’d’),(‘col3′,’d’),(‘col4′,’d’)]) data = np.fromfile(‘Files/Bin …

Total answers: 1

Pandas merge not working as expected in streamlit

Pandas merge not working as expected in streamlit Question: Summary When using pandas merge function within a callback function, the dataframe is not updated correctly. However, the pandas drop function works as expected Note that although i have turned on st.cache. The same behavior is noted when removing the cache function as well. Steps to …

Total answers: 1

Combine Date and Time inputs in Streamlit with dataframe time column

Combine Date and Time inputs in Streamlit with dataframe time column Question: I have a df that has a column ‘Time’ in seconds: Time 1 2 3 4 I want the user to input the date with a timestamp (eg format: 25/09/2022 12:30:00). Then, I need to add a new column ‘DateTime’ which combines the …

Total answers: 1

Streamlit – Cannot repeat emoji string using st.write()

Streamlit – Cannot repeat emoji string using st.write() Question: Summary: Normally to repeat a string in python, you’d use (string * n) where n = number of times to repeat. In Streamlit you have the ability to print emoji using corresponding shortcodes in st.write(). I’ve been able to use st.write(emoji1, emoji2, emoji3) to print emoji …

Total answers: 1

Streamlit Markdown

Streamlit Markdown Question: I am using markdown and try to color words like it says in the streamlit documentation but it won’t work, any can help me please ? import streamlit as st st.markdown("Text can be :blue[azul], but also :orange[laranja]. And of course it can be :red[red]. And :green[verde]. And look at this :violet[violeta]!") it …

Total answers: 2

How can I filter by month using streamlit date_input() input widget?

How can I filter by month using streamlit date_input() input widget? Question: I have a column like this YYYY-MM-DD in a data frame (look image below). Here is how .csv file looks like: Data de la classe,Genere,ID,Durada,Preu 2022-09-07,H,RQWLPVCJ,1h 30min,21.00 (Some numbers/letters appear in orange. That is caused due to code sample) I want to add …

Total answers: 2

Show the entire DataFrame if any filter is selected in streamlit

Show the entire DataFrame if any filter is selected in streamlit Question: I want streamlit to show the entire DataFrame when any filters are applied. Here is the code I think will be useful enough: df = pd.read_csv(‘classes_particulars.csv’) #Filters idCode = st.sidebar.multiselect( "Selecciona un ID", (‘ABSUDUHM’, ‘DWHWBMMX’, ‘MIXEECJR’, ‘NFKQWKOP’, ‘RQWLPVCJ’) ) preuPagat = st.sidebar.number_input( "Preu …

Total answers: 1