Questions tagged [streamlit]

Questions about Streamlit and custom machine learning models in Streamlit.

Streamlit lets you create apps for your machine learning projects with deceptively simple Python scripts. It supports hot-reloading, so your app updates live as you edit and save your file. No need to mess with HTTP requests, HTML, JavaScript, etc. All you need is your favorite editor and a browser. Learn more at https://github.com/streamlit/streamlit.

1822 questions
51
votes
8 answers

How to run/debug a streamlit application from an IDE

I really like streamlit as an environment for research. Mixing a notebook/dashboard-like output I can design quickly with pure code for its definition (no cells etc.) as well as the ability to influence my code through widgets while it runs is a…
Ben
  • 2,314
  • 1
  • 19
  • 36
24
votes
2 answers

How to fix StreamlitAPIException: ("Expected bytes, got a 'int' object", 'Conversion failed for column FG% with type object')

Error: StreamlitAPIException: ("Expected bytes, got a 'int' object", 'Conversion failed for column FG% with type object') Error Traceback Traceback: File "C:\Users\ASUS\streamlit_freecodecamp-main\app_3_eda_basketball\basketball_app.py", line 44,…
Fikri Sambasri
  • 247
  • 1
  • 2
  • 8
20
votes
5 answers

How Can I Run a Streamlit App from within a Python Script?

Is there a way to run the command streamlit run APP_NAME.py from within a python script, that might look something like: import streamlit streamlit.run("APP_NAME.py") As the project I'm working on needs to be cross-platform (and packaged), I can't…
David
  • 537
  • 1
  • 3
  • 9
19
votes
4 answers

Error Installing streamlit It says "ERROR: Could not build wheels for pyarrow which use PEP 517 and cannot be installed directly"

When I try pip install streamlit it fails with the error message: ERROR: "Could not build wheels for pyarrow which use PEP 517 and cannot be installed directly" I tried installing pip install pyarrow directly but still gives the same error message
Ijegwa Acheme
  • 191
  • 1
  • 1
  • 3
15
votes
3 answers

Set default value for selectbox

I am new to streamlit. I tried to set a default value for sidebar.selectbox. The code is below. I appreciate the help! Thank you in advance. st.sidebar.header('Settings') fichier = st.sidebar.selectbox('Dataset', ('djia', 'msci', 'nyse_n',…
vetheve
  • 209
  • 1
  • 2
  • 9
15
votes
3 answers

ImportError: libgthread-2.0.so.0: cannot open shared object file: No such file or directory when importing cv2 using Docker container

I was builting a web app with streamlit, OpenCV and Torch on local machine. The whole project went well until I built a Docker file and was about to transport it to my Google Cloud Platform. Can anyone tell me what is really going wrong here? Here…
Memphis Meng
  • 1,267
  • 2
  • 13
  • 34
15
votes
7 answers

Center Streamlit Button

How do I center a button with Streamlit so that the button is still clickable? Here is a small example for a button that returns random numbers: import streamlit as st import numpy as np if st.button('Click'): rand =…
jkortner
  • 549
  • 2
  • 8
  • 23
10
votes
1 answer

Tunnel not found error Pyngrok streamlit collab

I was developing an ui in streamlit and using pyngrok from Colab. everything was working fine till few days earlier the tunnel not found error started occurring. I am using below code. I have also upgraded pyngrok and tried but same problem…
imhaka
  • 37
  • 11
9
votes
3 answers

How to use python dataframe styling in streamlit

I have styled my dataframe using the below code: th_props = [ ('font-size', '14px'), ('text-align', 'center'), ('font-weight', 'bold'), ('color', '#6d6d6d'), ('background-color', '#f7ffff') ] …
9
votes
3 answers

Returning Latitude, Longitude values from folium map on mouse click to python script (streamlit webapp)

I am writing a webapp where the user will click on the map and the latitude, longitude will be returned to the python script. the webapp is written on streamlit and for the map I am using folium. Currently, I used folium.LatLngPopup() to get the on…
tuntun
  • 91
  • 1
  • 5
8
votes
3 answers

Installation error streamlit: Building wheel for pyarrow (pyproject.toml) ... error

I try to install metaploit, but every time I get errors and I can't get it to work. During installation I get the following error code: pip install --upgrade streamlit (Deleted a lot of irrelevant information) Building wheels for collected…
Daan
  • 83
  • 1
  • 1
  • 5
8
votes
2 answers

Can a streamlit app be run within a flask app?

No code here, just a question. I have tried various means to get a streamlit app to run within a flask app. Main reason? Using Flask for user authentication into the streamlit app. Cannot get it to work out. Is it not possible perhaps?
John Taylor
  • 655
  • 6
  • 19
8
votes
2 answers

How do you get Plotly to adjust plot size based on screen resolution in a Streamlit app?

I'm building a streamlit app with plotly graphs. However, I'm finding it hard to set a dynamic plot width in the plotly figures (I expect the app to be viewed in multiple resolutions). Is there a way to tell plotly to use 100% (or 80%, etc.) of the…
MYK
  • 1,988
  • 7
  • 30
8
votes
3 answers

Streamlit how to display buttons in a single line

Hi all I am building a simple web app with streamlit in python. I need to add 3 buttons but they must be on the same line. Obviously the following code puts them on three different lines st.button('Button 1') st.button('Button 2') st.button('Button…
Wing
  • 642
  • 2
  • 5
  • 16
8
votes
3 answers

/healthz route of an app deployed on Google App Engine returns 404

HTTP requests for a /healthz route on an app deployed on Google App Engine don't seem to reach the /healthz endpoint within the app. Instead, a 404 page is served, apparently from the GCP infrastructure. Can I know how to override this behaviour…
1
2 3
99 100