module ‘streamlit’ has no attribute ‘set_page_config’
This is my repo:
please look into it
Thankyou
module ‘streamlit’ has no attribute ‘set_page_config’
This is my repo:
please look into it
Thankyou
Hey @iamchoudhari11,
First, welcome to the Streamlit Community!
In your requirements.txt you have a lot of (94!!) specific packages including streamlit==0.69
which is a very old version, we are currently on 0.82. In Streamlit 0.69 the st.set_page_config
was still in beta.
I would recommend upgrading to a newer version of streamlit. If for some reason you can’t do this (again HIGHLY recommend that you do) in version 0.69 the call for setting the page config is st.beta_set_page_config
I also think you should remove any of those packages from your requirements.txt that you don’t specifically use in your app. Checkout this link to know why:
Happy Streamlit-ing!
Marisa
Thanks For your Quick Reply
it helped me while converting streamlit version and removing unwanted libraries.
But currently I am facing another issue:
This is my app:
https://share.streamlit.io/iamchoudhari11/yoga_pose/main/my_app.py
Steps:
Go to BlazePose / Openpose from sidebar and you can see button which take real time feed from your camera and I designed it using Opencv.
But when I press button it throws error:
Whoops — something went wrong! An error has been logged.
Detail Error:
cv2.error: OpenCV(4.5.2) /tmp/pip-req-build-5wrl9sz4/opencv/modules/highgui/src/window.cpp:673: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function ‘cvDestroyAllWindows’
Could you please help me out of this
Thankyou
Hi @iamchoudhari11,
Something to consider as you’re developing your project: The application will try and fail to open a video source with opencv on line 60 of blazepose.py: cap = cv2.VideoCapture(0)
The app will work on your local machine as the “server” and “client” are identical. However, if you deploy your app on a remote server (including Streamlit Sharing), opencv will not be able to find the video source (webcam) as none exists. Meaning, there’s no webcam for the container on Streamlit sharing to open (because there’s no video card, no “display” attached).
You will need to use a component to get your users’ webcam feed. @whitphx is the creator of the awesome streamlit-webrtc component for real-time video processing. You should be able to use streamlit-webrtc to capture frames from users’ webcam feed and then process them with tools like opencv.
Happy Streamlit-ing!
Snehan
@snehankekre thank you for introducing me.
I have developed streamlit-webrtc
to solve this exact problem.
Please check out this forum topic New Component: streamlit-webrtc, a new way to deal with real-time media streams to know the history of this library.
This tutorial Building a Web-Based Real-Time Computer Vision App with Streamlit - DEV Community might be a good first article to read to use streamlit-webrtc
.
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.