Questions tagged [streamlit]
Questions about Streamlit and custom machine learning models in Streamlit.
316
questions
0
votes
0answers
13 views
Google's App Engine: Streamlit WebRTC's player with sendrecv mode serves only one request at a time
I have a website built with Streamlit, hosted on Google's App Engine. Using streamlit_webRTC I implemented a streamer that reads image from visitor's camera, feeds it to my algorithm (face detection, ...
0
votes
0answers
9 views
Using Pillow with streamline, image is not defined error but on windows
Most of the fixes i saw for this was for like every other operating system besides windows. Unfortunately, i am on windows.
On the streamlit server i am getting:
NameError: name 'image' is not defined
...
0
votes
0answers
16 views
upload .gpx file Streamlit Python
I've made a Streamlit app using python, in which it is possible to drag and drop a gpx file.
import streamlit as st
file = st.file_uploader("Upload a strava file (gpx)", type=["gpx&...
1
vote
0answers
9 views
Clean st.cache for specific function in Steamlit
In streamlit, how can I just clean specific st.cache functions for a part.
I have the following structure
@st.cache
def get_data_from_csv(folder_name, csv_name):
#loop through all csv files under ...
-1
votes
0answers
17 views
How can I make this a proper x and y training set, I've been stressing over this for 2 days already >.< [closed]
So I set column 1 to 13 as my X
and column 14 "Class" as my Y
Can you guys correct my code so that I can apply RandomForestClassifier()
This is the error
Found input variables with ...
0
votes
0answers
18 views
st.multiselect autocomplete/match not working for numerical values?
I was wondering if anyone has tried to enter partial data in the streamlit st.multiselect box and have the options narrowed down? What I noticed is while non-numerical character matching works ...
0
votes
1answer
38 views
How to show values based on the user selection in pandas dataframe
The options for a second multiselect will be changed according to values in a pre-existing data structure.
import pandas as pd
import streamlit as st
df = pd.DataFrame({"A":[4,6,6],...
-1
votes
0answers
23 views
Plotly cartesian axis
Hi I am trying to get Cartesian style axis on my Plotly graph, I have got the axis in the right position but can not anchor them to the zero line. Any ideas would be appreciated, thanks.
fig = go....
0
votes
1answer
42 views
how to plot a groupby using plotly and streamlit
I have a dataframe consist of 3 columns I want to plot the crosstab result of 3 columns
I am able until now to plot bar chart of grouping 2 columns. on jupyter notebook without using of streamlit
when ...
0
votes
2answers
29 views
Adding [theme] code to setup.sh file to deploy a Streamlit app on Heroku
I deployed my Streamlit app on Heroku, the setup.sh file in my github that's used by Heroku has this code :
mkdir -p ~/.streamlit/
echo "
[server]
port = $PORT
enableCORS = false
headless = true
...
1
vote
1answer
42 views
Converting nested dictionary to pandas dataframe and plotting
I have a listener which is constantly logging received messages in the following way --
class Listener:
recorded = defaultdict(lambda: defaultdict(list))
def on_message_received(self, msg):
...
0
votes
1answer
17 views
Streamlit python app deployed successfully to heroku, but i get an application error
So i have a Streamlit python app i wanted to deploy on heroku , the doployment was successful , but when i open the app it gives me an application error
for starters, here is my requirement file :
...
1
vote
1answer
17 views
How do I download csv changes from my Heroku
I made a heroku app with streamlit and I used two csv files to save changes. The app is a schedule for group plans, the changes people introduce in the schedule are visible online but when i check my ...
-1
votes
1answer
27 views
I'm trying to use Prophet from fbprophet but I'm getting this excuciatingly long error message no idea what's suppose to mean?
ERROR: Command errored out with exit status 1:
command: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/...
0
votes
1answer
31 views
how to plot bar chart by allowing the user to choose the columns using plotly and python with streamlit
I have a dataframe consist of 3 columns
I want is to plot the result based on the user selection of the columns.
I am able until now to plot bar chart but with specifying in the code the column and ...
-1
votes
0answers
14 views
I'm stuck in my code which is based on python streamlit . During fetching date time in dataframe, csv file shows me empty
uploaded_file = st.sidebar.file_uploader("Choose a file")
if uploaded_file is not None:
if st.checkbox('Show'):
df = pd.read_csv(uploaded_file)
d5 = st.date_input("date range ...
0
votes
0answers
9 views
DataVisualization is not working properly in python when deployed on Streamit
I have created a small machine learning model and wanted to deploy it on streamlit.
But Data visualization is not happening on Streamlit.
While I'm able to achieve this in jupyter notebook.
Note: ...
0
votes
0answers
10 views
AttributeError: 'str' object has no attribute 'decode' in streamlit and heroku deployment
I deployed my model in Heroku but the below-mentioned attribute error is appearing in the web app. The heroku and streamlit platforms are not able to unpack my .h5 model for classification purposes. ...
0
votes
0answers
22 views
AttributeError: 'str' object has no attribute 'decode' in heroku platform
I deployed my model in Heroku but the below-mentioned attribute error is appearing in the web app.
The heroku and streamlit platforms are not able to unpack my .h5 model for classification purposes.
...
0
votes
2answers
32 views
Name is not defined streamlit
I am trying to access my variable but it say name is not defined, Here I read pdf file
def read_pdf(file):
with open(file, "rb") as f:
pdf = pdftotext.PDF(f)
st.write('...
0
votes
0answers
27 views
streamlit usage with bootstrap
Im just fooling around with streamlit (a python application), and Im wondering if anyone could help me out.
I am relatively new to programming, so the question might be silly.
I want the web-...
0
votes
0answers
7 views
Opening Streamlit using bat file results in File Not Fund Error
Trying to open a app using .bat file so that other users don't have to use a terminal to open the app. The bat file has the contents as below
set root=C:\Users\***\Anaconda3
call %root%\Scripts\...
0
votes
0answers
16 views
Is there a way to save docx via a link using python docx package?
I’ve tried to use streamlit app to do some kind of Word Docx automation works using the python docx package. After the script run I’ve got a document object, is there any way to provide a downloadable ...
0
votes
1answer
32 views
How to get a calculated scalar out of a dataframe
I have a dataframe as shown below. I want to group and return the count of Campeão registers, so that I can have this scalar into a output text for users.
I'm using this code to display a table with ...
-1
votes
0answers
16 views
The system cannot find the specified file - Python (offline usage Anaconda)
Hello I am using Anaconda with Python 3.8 and VSCode on a offline windows server where there is no internet connectivity (because of security reasons). I install the required package using pip on my ...
0
votes
1answer
24 views
Problem with different extension files upload at streamlit
I'm trying to let the user select what files he wants to upload, but I'm facing a problem.
For example, there are two types of extension files the user can upload (csv and xlsx). After he upload his ...
3
votes
2answers
166 views
Select multiple options in checkboxes in Streamlit
I am new to Streamlit. I want to make a multiple-choice user input (checkboxes). But I want to select a maximum of 3 options out of 4 options.
I have tried with the dropdown feature of multiselect.
...
0
votes
0answers
21 views
How Can I Upload a txt File into Heroku and Then Access it via its URL Path
TL;DR: I'm having trouble uploading a file into heroku and then accessing it via its url path
The application deploys fine (you can see it here: https://toronto-crime.herokuapp.com/)
But I'm trying to ...
0
votes
0answers
25 views
Preventing source to be updated automatically
I've been using streamlit for a dashboard which its data gets updated every 5min (a new .csv file is generated). The issue is that every time a new file is generated, the source seems to change ...
0
votes
0answers
28 views
Clear images in Streamlit
I would like to clear the content using Streamlit when accessing the URL on my android phone. The following code displays a given color background whether the number is odd or even. It displays ...
0
votes
0answers
12 views
Switching language of streamlit date_input widget
I want to change the language of the months on calendar date_input widget of a streamlit app, I couldn't find any option who could translate it, anyone have any idea to translate?
0
votes
0answers
8 views
Error in deploying webapp in heroku made by streamlit
I've uploaded all file dependencies of the web app made with streamlit into the github.
Repo link : https://github.com/sagnik1511/Lifely
But when I'm trying to deploy this project into Heroku it ...
0
votes
0answers
20 views
python run streamlit package on windows without internet connection
I installed Streamlit package on a pc without internet connection when i try to test streamlit i run streamlit hello this statement works fine .But when i try to use the below statement
streamlit run ...
-1
votes
0answers
14 views
How do I point my Streamlit/Heroku app to a URL path within my domain?
For example,
I have an app made using Streamlit called "xyz" currently deployed using Heroku on www.example.com, a domain that I own. I want to host my app at www.example.com/xyz. What do I ...
1
vote
0answers
30 views
Calling different function based on checked check-boxes
I am using python and streamlit to compare between pandas DataFrames on different columns, the basic idea is that I have a check box of 5 columns and I want to call the function "data_matching&...
0
votes
1answer
21 views
How to handle “Memory quota exceeded” in heroku app developed using streamlit and PyTorch?
I have been developing a style transfer image application using streamlit and PyTorch. The app is facing memory quota exceeded whenever high resolution image is stylized(using the app). How do I ...
0
votes
1answer
19 views
Scatter plot is not getting published in streamlit
This below code for streamlit Python program is working fine.
avg=s/c
k=s2.std(axis=1)
cv=(k/avg)
b6=b9.assign(average_value=avg,Std_Dev=k,Coff_Var=cv)
b8=b6.loc[b6['average_value'] > 1]
st.write(...
0
votes
1answer
25 views
Using external JS libraries with Streamlit
How can I use an external Video/Audio JS library like Wavesurfer.js to render and interact with my streamlit app?
0
votes
0answers
24 views
Why use streamlit's cache and not regular caches?
What the advantage is to use streamlit's cache in a streamlit app compared to a regular cache, say functools's lru_cache? Would a regular cache me cleared every time the app is rerun (due to a change ...
2
votes
1answer
26 views
Altair/Vega map not showing. Chrome fails to load SourceMap
I am trying to place some dots on the map of Europe.
import altair as alt
import pandas as pd
mydf = pd.DataFrame({
'name': ['Constanta', 'Turin', 'Madrid', 'Copenhagen', 'Berlin'],
'...
-2
votes
1answer
25 views
Probelm with my webapp, how can I solve it?
I have a small big problem with an app I have created, using Python and Streamlit.
The problem is that when I want to deploy it to the Heroku services, it builds, but when I try to access it, it tells ...
0
votes
1answer
24 views
How can I load and feed data from multiple excel/csv sheets into the mutliselect function? - Streamlit
Context
In my web-app, I want my users to select different data categories and upon selecting this data category, it will load the data from its respective csv into the mutliselect function. The below ...
0
votes
0answers
26 views
How do I add an element to a Streamlit website during runtime?
I want to have a button that creates an additional input box when clicked. It needs to be able to put labels on each input box, add as many boxes as desired, and keep them around for the entire time ...
0
votes
0answers
31 views
I am beginner in streamlit framework I have made first program using stream lit it is showing error :
enter code here
import streamlit as st
import pandas as pd
from sklearn import datasets
from sklearn.ensemble import RandomForestClassifier
st.write("""
# Simple Iris Flower Prediction ...
1
vote
1answer
31 views
Execute line of code when length of list changes Python
I am trying to show a certain piece of text when the list length is greater than one.
Initially when the streamlit app is run there are no files in the uploaded images list so I dont want to show the ...
1
vote
0answers
60 views
Can't Demonstrate uploaded Image in Streamlit with PIL
I was working on displaying uploaded file in Streamlit, but I got an error. Here, the user will upload an image then the image will be displayed .I am using PIL 8.0.1 and Python 3.9 and obviously ...
1
vote
0answers
47 views
Get username from basic-auth mechanism in Traefik/Streamlit/Docker app
I'm using Traefik/Streamlit/Docker stack in my ML project.
I want to use basic-auth mechanism to get a Username variable, that user provides to basic-auth, and use it in Streamlit app to provide the ...
0
votes
0answers
26 views
Streamlit: How to interatively add items to a list?
I have a list and I want to add another item by the click of a button. With the following code, I can do this once:
slot_list = st.empty()
li = [1,2,3]
slot_list.write(li)
def append_function(x):
...
0
votes
0answers
24 views
Is it possible to manage colors of rows in pandas dataframe?
I'm currenty in an issue with my python script.
I had generate a transposed dataframe from a groupby aggregates.
I want to color rows 3 by 3 with differents colors, but after few trying, I haven't ...
0
votes
0answers
12 views
PYTHON : Is it possible to color specifics rows in a pandas dataframe object?
I'm currenty in an issue with my python script.
I had generate a transposed dataframe from a groupby aggregates.
I want to color rows 3 by 3 with differents colors, but after few trying, I haven't ...