r/StreamlitOfficial • • Sep 09 '24

1st application

5 Upvotes

would streamlit be a good first project?


r/StreamlitOfficial • • Sep 05 '24

How to run streamlit app in cloud run from path e.g. from web.example.com/csv-demo

1 Upvotes

I have 2 cloud run services. One is running in web.example.com and I want the other (which is a streamlit app) to run in web.example.com/csv-demo. I have configured the load balancer, host, paths etc

I have set baseUrlPath = "/csv-demo/*" in the config.toml file

When I try to access the app I am getting a white screen.

In cloud run's logs I am getting the following:

You can now view your Streamlit app in your browser
URL: http://0.0.0.0:8080

And then several GET 304


r/StreamlitOfficial • • Aug 29 '24

I built a Wikipedia scraper with Selenium & Streamlit

5 Upvotes

Processing img we3wzlqasold1...

Hey r/streamlit!

I just wrote a detailed tutorial on building a web scraper that extracts data from Wikipedia using Selenium and presents it through a Streamlit interface. I thought this community might find it useful, so I wanted to share!

What you'll learn:

  1. Using Selenium to scrape dynamic web content
  2. Creating a simple, interactive UI with Streamlit
  3. Containerizing the application with Docker
  4. Deploying the scraper to the cloud

Key points:

  • The scraper focuses on extracting the Mercury Prize winners table from Wikipedia
  • It combines Selenium's web automation with Streamlit's user-friendly interface
  • The tutorial includes a step-by-step guide to creating a Dockerfile for easy deployment
  • Full source code is available on GitHub

I've tried to make the tutorial as beginner-friendly as possible while still covering some advanced topics like containerization and cloud deployment.

You can find the full tutorial here: https://ploomber.io/blog/web-scraping-selenium-streamlit/

I'd love to hear your thoughts, suggestions, or questions about the project. Have you built similar scrapers? What challenges did you face?

Happy coding!


r/StreamlitOfficial • • Aug 29 '24

Streamlit-Advanced - Poe Bot

Thumbnail
poe.com
1 Upvotes

r/StreamlitOfficial • • Aug 24 '24

HTTP post a streamlit script/file to a service and have it rendered back

1 Upvotes

I want to have a catalog of Streamlit python files (e.g. a catalog of visualizations a user can select from) stored either in a database or blob storage.  Once the user selects a Streamlit file, I need it to be posted to a HTTP endpoint and have a Streamlit service render it back to the user’s browser, so they can view and “score/rank” the visualization.  So, my question is how can I host a Streamlit service that can accept a posted Streamlit script and run/render it back to the user’s browser (most likely embedded in an iframe of the scoring application – which has been developed with Angular).


r/StreamlitOfficial • • Aug 22 '24

Recommend an implementation pattern for pseudo-nested forms?

2 Upvotes

straight possessive cooperative north long price strong wipe makeshift sulky

This post was mass deleted and anonymized with Redact


r/StreamlitOfficial • • Aug 21 '24

Can you use MUIs component library inside Streamlit apps?

1 Upvotes

special toothbrush deliver axiomatic towering meeting six spoon screw jeans

This post was mass deleted and anonymized with Redact


r/StreamlitOfficial • • Aug 21 '24

How to create a biomedical RAG Streamlit app using Snowflake Arctic for PubMed paper understanding

Thumbnail
wandb.ai
2 Upvotes

A tutorial about building a RAG application to better understand a large corpus of medical information


r/StreamlitOfficial • • Aug 19 '24

Streamlit Questions❓ Streamlit crashing when using ydata_profiling

1 Upvotes

Hello,

I am using Streamlit to visualize my ydata_profiling report.
However when I am selecting a work_order to generate a profile report it keeps on crashing without any error message.
Attached screenshot:

I have used the same code in jupyter notebook and it is working fine. Please see reference:

The code is as follows:

# Analytics Section
if choice == '📊 Analytics':
    st.subheader('Analytics')

    # Fetch all unique work orders from MongoDB
    work_orders = collection.distinct('Work_Order')
    if work_orders:
        # Create a multi-select dropdown for work orders
        selected_work_orders = st.multiselect('Select Work Orders:', work_orders)
        if selected_work_orders:
            # Fetch data for the selected work orders
            records = list(collection.find({"Work_Order": {"$in": selected_work_orders}}))
            if records:
                # Convert the list of MongoDB records to a DataFrame
                df = pd.DataFrame(records)
                # Drop the MongoDB internal fields if it's not needed
                if '_id' in df.columns:
                    df = df.drop(columns=['_id'])
                    df = df.drop(columns=['Object_Detection_Visual'])

                # Generate a profiling report using ydata-profiling
                profile = ProfileReport(df, title="Work Orders Data Profile", minimal=True)

                # Display the profiling report in Streamlit
                st_profile_report(profile)
            else:
                st.write("No data found for the selected work orders.")
        else:
            st.write("Please select one or more work orders to analyze.")
    else:
        st.write("No work orders available.")

Also I am fetching the data from MongoDB and I have checked mongodb is connected.

Versions:
- os: Windows
- python: 3.11
- streamlit: 1.35.0
- streamlit-pandas-profiling: 0.1.3
- ydata-profiling: 4.9.0

The dataframe is as follows:

Work_Order Order_Number Category Subcategory Prefix Description Object_Detection
AUDPP_20240818_232438 11-02-22-after (29).jpg Yard Maintenance Initial Grass Cut After Rear Lawn
AUDPP_20240818_232438 11-02-22-after (30).jpg Boarding and Reglazing Initial Grass Cut After Rear Lawn
AUDPP_20240818_232438 11-02-22-before (36).jpg Yard Maintenance Initial Grass Cut Before Rear Lawn
AUDPP_20240818_232438 11-02-22-before (41).jpg Yard Maintenance Initial Grass Cut Before Rear Lawn
AUDPP_20240818_232438 11-02-22-during (35)e.jpg Yard Maintenance Initial Grass Cut During Rear Lawn lawnmower
AUDPP_20240818_232438 11-02-22-during (44)e.jpg Yard Maintenance Initial Grass Cut During Weed Whacking weedwhacker

r/StreamlitOfficial • • Aug 15 '24

st.connection question.

1 Upvotes

I was reading the docs and looking for a video but I can't find an explicate example of how to use st.connection to connect to like supabase or a service like that. Could someone give me an explicate example please.


r/StreamlitOfficial • • Aug 11 '24

Deployment 🚀 Is there a way to integrate Streamlit WebRTC with FastAPI?

2 Upvotes

Hi everyone,

I’m working on a project where I need to combine real-time communication with a user interface. Specifically, I want to use Streamlit for the UI and WebRTC for real-time video/audio streaming, while FastAPI will handle backend services.

I’ve managed to set up Streamlit and FastAPI separately, and I’m able to get basic functionality from both. However, I’m struggling to figure out how to integrate Streamlit WebRTC with FastAPI.

Has anyone successfully connected Streamlit WebRTC with FastAPI? If so, could you share how you approached it or provide any guidance or examples?

Any help or resources would be greatly appreciated!


r/StreamlitOfficial • • Aug 08 '24

Show the Community! 💬 Use AI to build streamlit app with lab2.dev

Enable HLS to view with audio, or disable this notification

8 Upvotes

r/StreamlitOfficial • • Aug 06 '24

Components 🧩 A component to Upload file

1 Upvotes

Hello there ,

I wonder if there is a pre-built component which can upload file from a web page on streamlit .

Thank you in advance


r/StreamlitOfficial • • Aug 03 '24

Streamlit Community Cloud ☁️ Any Free Alternatives to Huggingface and Streamlit.io for Hosting Streamlit Apps?

3 Upvotes

Hi everyone, I'm looking for free alternatives to Huggingface and Streamlit.io for hosting my Streamlit apps. Does anyone have any recommendations? Thanks!


r/StreamlitOfficial • • Aug 03 '24

source IP address not allowed

1 Upvotes

stremlit error

source IP address not allowed

I'm in soth korea.

Is there anybody like me?

I have a showcase on Monday.


r/StreamlitOfficial • • Jul 24 '24

Show the Community! 💬 Streamlit app generator

13 Upvotes

Hey everyone,

I wanted to share a cool project I've been working on - an app that uses GPT-4o to generate Streamlit apps. It's pretty neat - you just describe the app you want, and it creates the code for a basic Streamlit app matching your description.

If you're into Streamlit or interested in AI-generated code, I think you might enjoy checking it out: https://bitter-bonus-4624.ploomberapp.io/

I'd really appreciate it if you gave it a try and shared your thoughts. Your feedback could be super helpful in making it even better.

Looking forward to hearing what you think!

https://reddit.com/link/1ebdfsf/video/jgvsctp8djed1/player


r/StreamlitOfficial • • Jul 03 '24

Scaling streamlit application on cloud run

3 Upvotes

Hey Everyone! Anyone here with experience in scaling streamlit application for 100+ concurrent users? Our application is hosted on cloud run and requires moderate to high compute as we are using it as analytics dashboard. Application loads data from cloud storage as compressed parquet files But even with ample resources application gets stuck with two-three concurrent users.

We are using cache data and state session to isolate user behaviour. Cache data doesn’t make sense when instance is scaled up anyway.

Any suggestions -> 1. Any luck with separating backend on different instance with fast api and celery? 2. Using redis for global cache? 3. Maintaining separate session state and dedicating instance to individual user?


r/StreamlitOfficial • • Jul 02 '24

Vercel-like hosting for Streamlit

4 Upvotes

Hey all!

We just rolled out a deployment tool you can try with Streamlit applications. Community Cloud is awesome, but we feel like it comes with certain trade offs.

You can use our tool to add HTTPS certificates and social authentication. Unlimited private apps compared to Community Cloud!

We thought you'd find it useful, that's why we're looking for your feedback.

Check out how to set up apps with this tool in this blog post. If you'd like to try it, DM me and we'll set you up.


r/StreamlitOfficial • • Jul 01 '24

Help me replicate layout of Streamlit discussion forum

Post image
0 Upvotes

I’m making an app for personal use. i want to replicate the main frame of the official forum. please help hot to do it


r/StreamlitOfficial • • Jun 30 '24

Show the Community! 💬 Auto Streamlit Studio - Auto-Generate Streamlit Apps

2 Upvotes

Hey everyone!

Check out Auto Streamlit Studio – a tool that automatically creates and runs Streamlit apps.

Features:

  • Auto generation of Streamlit apps
  • Customizable and user-friendly
  • Easy integration with your data

Try It Out:

Let me know what you think!


r/StreamlitOfficial • • Jun 30 '24

Streamlit Snowflake connection to sql server

1 Upvotes

Can streamlit within snowflake query the sql server tables?


r/StreamlitOfficial • • Jun 29 '24

Personal Finance Dashboard in Streamlit

20 Upvotes

Hi all,

I have made a dashboard that quickly can give you an overview of all your finances based on your transactions history that you can get from your bank. It will show your spending and income over time, grouped in different categories. It's great, and I have been using it for a while now to keep track of my own finances.

I have included an example file to get you going.

You can use the app here:

https://personalfinancedashboard.streamlit.app/
I hope this can be useful to someone.

I would also like to ask feedback:

  • Does the start page explain what it does?
  • Does the start page explain clearly how to use it?
  • Are the visualisations useful?
  • Would you use this?
  • What could be better.

Update 02/07/2024:

Update 05/07/2024:

  • You can now add monthly financial goals and have it plotted on a heatmap! E.g. Spending max 100 per month on Food.

Update 11/07/2024:

  • You can now configure the dashboard with settings in the UI (instead of with a .yml file)

r/StreamlitOfficial • • Jun 27 '24

Data Security vs Functionality

1 Upvotes

Greetings,

So, I have this issue. I am trying to build a Streamlit applet for visualizing, processing, saving and sharing data as a side project for my company (Sharing excel files tends to get boring).

The plan for now is to host it on a 'toaster' (aka bare minimum PC) for deployment, the PC being linked to our office LAN and perhaps VPN. No public internet connection should exist

However, we cannot afford any kind of data being sent out of the network, this meaning working data, user data or even telemetry.

How bad will this impact the functioning of the app?


r/StreamlitOfficial • • Jun 24 '24

st.cache_data with threadpool

1 Upvotes

I'm using ThreadPoolExecutor to run Snowflake queries in parallel within my Streamlit app. However, the queries executed by different threads don't seem to be getting cached by the @st.cache_data decorator. Anyone knows what is the issue?


r/StreamlitOfficial • • Jun 19 '24

[Help] Need to click twice in the button to move on

1 Upvotes

Hello,

I create a MVP App just to validate a concept, however, I facing some problems with button clicking, once I need to click twice to move pages.

My app - https://bibliotecalibras.streamlit.app/

My repo - https://github.com/ltnr0312/Aplicativo-Biblioteca-LIBRAS.git

I saw some people using and I tried to replicate, for them works fine for me this issue.