An Unfiltered Deep Dive into Streamlit's Limitations

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ก.ย. 2024

ความคิดเห็น • 31

  • @tylerjrichards_ds
    @tylerjrichards_ds ปีที่แล้ว +2

    "but now you have to manage your own threads" getting this tattooed on my arm

    • @andfanilo
      @andfanilo  ปีที่แล้ว +1

      Ahahah don't tattoo yourself too many of those threads! =D

  • @CJP3
    @CJP3 ปีที่แล้ว

    Great insights! Thanks for publishing!

    • @andfanilo
      @andfanilo  ปีที่แล้ว

      Thanks for watching, happy Streamlit hacking!

  • @piengenharia8946
    @piengenharia8946 10 หลายเดือนก่อน +1

    I think that the worst in streamlit is not having a gallery component selectable... it could be a lot more with this component, navigating would be much easier

  • @rockNbrain
    @rockNbrain ปีที่แล้ว

    Great job Fanilo ! Tks 🎉

    • @andfanilo
      @andfanilo  ปีที่แล้ว

      Thanks for the support :)

  • @ekaterinakorolkoviene5824
    @ekaterinakorolkoviene5824 ปีที่แล้ว +1

    I think there is time for falling in love with streamlit and time to realize that you've outgrown it. Me personally somewhere at the latter point, after one year and hundreds of attempts of "hacking" it.

    • @andfanilo
      @andfanilo  ปีที่แล้ว +3

      I think I did this video for people at the same place as yours, at the end of the "Trough of Disillusionment" and figuring out a valuable place for Streamlit in your toolbox now that you have experienced its limitations.
      Ultimately I'm fine with Streamlit being "a tool to quickly demonstrate my ideas to stakeholders" as my primary job is to demonstrate value in a limited time (though I do have 2-3 apps for monthly reporting in production where users there don't care about the styling for the app, they just want a "Compute for this month" and "export to Excel file" buttons). I value Streamlit for how fast and easy it is for me to have an idea go from my head to a webapp, and I'm ok with 1-2 hacks.
      But your case may have grown further than just proving value, and when it goes further than an MVP where stakeholders are going to ask for more and more features, I know Streamlit is harder to scale. Dash/Panel's value proposition would be oriented towards "going from MVP to production" but conversely I find it way harder to quickly express my ideas with those given their reactive/callbacky APIs, so I don't have a good use case to learn them and do YT tutorials about them..
      I have NiceGUI/Solara/Shiny in my Streamlit alternatives before going the full FastAPI/HTMX or React route, and I may do YT videos about those in the near future. What are you planning to test next as Streamlit companions? I'd love to hear what videos you'd like to see :) (apart from putting Streamlit on IIS eheh)

    • @ekaterinakorolkoviene5824
      @ekaterinakorolkoviene5824 ปีที่แล้ว +1

      @@andfanilo now that's why I love your content: I thought my next one would be H2O wave, because i had a great opportunity to see the presentation about it on Pycon from one of the devs and it looked promising, but now I googled NiceGUI and it is nice:)

    • @jcheng_
      @jcheng_ ปีที่แล้ว

      @@andfanilo Hi, I'm the creator of Shiny. I and others on our team are big fans of your channel!
      I am biased, but I don't think Shiny's reactive paradigm should be lumped in with the callback based designs of Dash, Panel, and NiceGUI. (In fact, I designed Shiny after being subject to "callback hell" for many years as a desktop UI programmer--I talk about it here: th-cam.com/video/HpqLXB_TnpI/w-d-xo.html)
      In our experience over many years of Shiny for R, Transparent Reactive Programming is an incredibly nice balance of speed of authoring, runtime efficiency, safety, and ability to manage app complexity. The downside is the up-front investment needed to learn it: it's easy to get started with, but definitely not as easy as Streamlit.
      If you're interested, I'd be more than happy to connect with you directly to talk about these ideas, whether you end up making a video on the subject or not. I'd also have many questions for you!

    • @andfanilo
      @andfanilo  ปีที่แล้ว

      Hello, nice to meet you, and thank you for the support 🙂
      Shiny has been in my todo list ever since it was released in alpha (I did play with Shiny for R a long time ago, though I don't remember much...). Didn't see your conference video though, thanks for sharing!
      I've barely scratched Shiny for Python's surface, tried it for an hour at most. I'm sure I failed to capture its nuances by putting everything together in the category of "Streamlit competitors that are more reactive". I plan to do 1 (or more..) video about Shiny, as I have the goal of niching up into the "Python data web apps ecosystem".
      I haven't found the time to dive deep into Shiny yet though. TH-cam side-hustling a decent video every 2 weeks is already hard to keep up with. So I'd love to compare the philosophies of Shiny and Streamlit with you, that will surely speed up the brainstorming of a Shiny video!
      You can ping me on Linkedin or Twitter, I haven't been able to connect on Linkedin 🤔
      Have a nice day!

  • @darkcss1054
    @darkcss1054 ปีที่แล้ว

    I never liked cross filtering in Tableau and PowerBI. I work with Economics and it feels like cross filtering would be more useful in specific use cases like corporate finance, or HR, where you have very dense hierarquical databases.
    I feel though that the most I can get out of Streamlit is kind of hacking it, like you said. Using lots of st.markdown with unsafe_allow_html, a lot of components.html and yes, making reactive content is very difficult. I saw your video tutorial of react with plotly, which worked great, but I couldn't reproduce it with Pydeck.
    Feels like I would be able to get a lot more out of Streamlit if I knew more javascript, so I intend to learn it as best as I can. Looking forward for your tutorials on it with Streamlit😊

    • @andfanilo
      @andfanilo  ปีที่แล้ว +1

      Hey! I don’t use cross filtering a lot either, most of the people that consume analytics like it laid out for them instead of having to do the work of selecting what they want to see on a graph to update the others reactively 😅 really depends on the end user…
      I just had many people ask for such feature, especially in github.com/streamlit/streamlit/issues/455 that I thought I should try it without using altair / plotly / Holoviz cross filtering ahah
      I’m happy with Sreamlit being simple and quick. I eventually learned React for Streamlit components (it sucks you weren’t able to implement pydeck, I’ll have to try when I have a moment) which led me to learning vue.js and CSS for small single page apps. And I don’t regret it, now I’m comfortable hacking Streamlit, Dash, Panel, NiceGUI, Shiny, you’ll know how to hack all the Python libraries or even build your custom FastAPI+SPA 😁 learning the JS stack is definitely a good thing if you’re determined, the data scientists I know don’t have this courage (and I totally understand that)
      Good luck on the journey 😊

  • @mayankbaber9384
    @mayankbaber9384 10 หลายเดือนก่อน +2

    Idk why people think about streamlit UI so much! It's made for deploying DS models, not flashy websites. The only reason to use stream is for developing a website that doesn't take much effort to deploy your ML/DL models. If you really want to do bullsh*t around it, go learn fullstack and do it. Why are you blaming Streamlit for something it wasn't made for?

    • @carlsv1
      @carlsv1 10 หลายเดือนก่อน +2

      I understand your point of view, but I disagree with your assessment of Streamlit. I think that the "flashy websites" that you are referring to are actually very important for the adoption of machine learning and data science. These websites can make it easier for people to understand and use ML/DL models, which can lead to wider adoption and impact.
      I agree that Streamlit is not meant to be a full-featured frontend framework. However, it is still capable of creating powerful and user-friendly interfaces. With a little creativity and effort, you can use Streamlit to create websites that are both informative and engaging.
      I also think that it is important to remember that not everyone has the time or resources to learn full-stack development.

  • @jorge1869
    @jorge1869 ปีที่แล้ว +4

    UI customization in streamlit sucks.

  • @mberghahn
    @mberghahn ปีที่แล้ว

    Hello Fanilo, can you share links to some of those big applications made on Streamlit? Will love to take a look at them. Thanks!

    • @andfanilo
      @andfanilo  ปีที่แล้ว

      Hey there! Most of the source code should be in the description, what parts were you looking into?
      Have a nice day!

  • @StrategicCIS
    @StrategicCIS 4 หลายเดือนก่อน

    Any tutorial on connecting a PDF cloud repository to streamlit for a LangChain RAG web app?

    • @andfanilo
      @andfanilo  3 หลายเดือนก่อน

      Hmmm not as far as I know…which cloud repo are you using?

    • @StrategicCIS
      @StrategicCIS 3 หลายเดือนก่อน

      @@andfanilo AWS S3. I have everything connected and communicating now. I'm now beating my head against the wall with the Streamlit linear execution behavior downloading the same file repeatedly, but I have it down to this:
      File download #1: I have a select box for choosing which .pdf document to grab from S3. This uses tempfile, and that tempfile is what is fed into the LangChain pdf document loader.
      File download # 2: All input text is in an st.form so that it's executed in batch. However, this still creates another tempfile when the submit button is pressed.
      How do I stop the second download from taking place?
      I see a lot of talk about st.session_state, on_change, and cache as being the tools to solve this problem, but I can't figure out how to use them.
      Or perhaps I could bypass all that and have the external select box populate a text input in the st.form and then batch process everything?

    • @andfanilo
      @andfanilo  3 หลายเดือนก่อน

      Hmmmm, I hope I understood correctly
      So are File Download #1 and #2, 2 different approaches to load files and you want to RAG over both, but you don't want #1 to execute #2?
      There might be multiple solutions. One that comes to mind is putting form on both #1 and #2 instead of just #2 to run the batch embedding on submit, and populate session_state with results:
      ```
      import streamlit as st
      if "embeddings" not in st.session_state:
      st.session_state.embeddings = None
      def file_download_1():
      f = st.selectbox('Select a file from S3', ['file1', 'file2', 'file3'], key='file1')
      return f
      def file_download_2():
      f = st.text_input('Or Enter the file name', key='file2')
      return f
      def main():
      st.title('RAG')
      with st.sidebar.form('form'):
      st.subheader('Select the files to run the embedding on')
      f1 = file_download_1()
      f2 = file_download_2()
      submit_button = st.form_submit_button('Submit') # can also use on_click callback to do embedding there and save result in session state. Input files are natively accessible from st.session_state.file1 and st.session_state.file2 because of the widget keys
      if submit_button: # probably need to test for existence of input too
      # do your batch processing here
      st.session_state["embeddings"] = f"Embed {f1} and {f2}"
      if st.session_state.embeddings is None:
      st.info('Please select the files to run the embedding on')
      st.stop()
      # from here on we have RAG ready
      st.write(f"Embeddings: {st.session_state.embeddings}")
      st.chat_input('Enter your question')
      if __name__ == '__main__':
      main()
      ```

  • @ruthwik081
    @ruthwik081 7 หลายเดือนก่อน

    Can you do a video with async io in streamlt

    • @andfanilo
      @andfanilo  7 หลายเดือนก่อน +1

      Maybe, in the meantime you can play with discuss.streamlit.io/t/issue-with-asyncio-run-in-streamlit/7745/7 , that may be helpful!

    • @ruthwik081
      @ruthwik081 7 หลายเดือนก่อน

      @@andfanilo my streamlit app is very fast on my laptop but quite slow on cloud run with similar cpus and memory. One thing I observed was CPU usage is never exceeding 18%, so I thought async io would help. Is it a good idea to use async io for mostly filtering and grouping

  • @imveryhungry112
    @imveryhungry112 6 หลายเดือนก่อน

    Why not use Plotly Dash?

    • @andfanilo
      @andfanilo  6 หลายเดือนก่อน

      I like Streamlit's speed and ease of use to demonstrate AI demos to VIP people (you can check out my latest video "5 Things I Wish I Knew Before Learning Streamlit" for more info on when I may use Dash)
      Have a nice day!

    • @imveryhungry112
      @imveryhungry112 6 หลายเดือนก่อน

      @andfanilo plotly dash is simple to use and behaves just like a react all to the end user. In fact I think it actually literally generates react code.

  • @akshanshkmr
    @akshanshkmr ปีที่แล้ว

    Meanwhile me using streamlit to analyse resource usage across 100s of users and millions of tasks at my job 😂

    • @andfanilo
      @andfanilo  ปีที่แล้ว +3

      When it gets the job done, Streamlit is so awesome to use :D is it something you can talk about publicly in a blog post or video ? I'd love to learn more !