Build an App with Streamlit Using PandasAI & Ollama for Data Analysis

Sdílet
Vložit
  • čas přidán 29. 08. 2024
  • Today, I'll show you how to create a data analysis app with Streamlit, Ollama, PandasAI locally and for free using Python.
    Subscribe ➡️ bit.ly/subscri...
    Join my channel ➡️ bit.ly/join-ti...
    00:01 Introduction
    01:01 Setup
    02:40 Initialize the app
    04:16 Start Ollama
    05:26 Initialize the model
    09:10 Inference
    LangChain Tutorials ➡️ bit.ly/langcha...
    Generative AI for DS ➡️ bit.ly/genai-f...
    HuggingFace Tutorials ➡️ bit.ly/hugging...
    Generative AI Tutorials ➡️ bit.ly/generat...
    LLMs Tutorials ➡️ bit.ly/llm-tut...
    Medium ➡️ / tirendazacademy
    X ➡️ / tirendazacademy
    LinkedIn ➡️ / tirendaz-academy
    Project files ➡️ github.com/Tir...
    Hi, I am Tirendaz, PhD. I create content on generative AI & data science. My goal is to make the latest technologies understandable for everyone. Don't forget to subscribe and turn on notifications so you don't miss the latest videos.
    #ai #generativeai #datascience

Komentáře • 25

  • @user-pj2yd9vp9j
    @user-pj2yd9vp9j Před měsícem +1

    Thank you very much for nice video. How can i apply two or more csv files in this pandasai and ollama?
    Ex) Comparing two or more csv file and finding the join of the csv files.

  • @majukanumi9639
    @majukanumi9639 Před 3 měsíci +2

    i think before you start the video about local llm you need to precise that this application need a high level computer using gpo otherwise to ask the model a simple question takes hours to answer..it works on your side because you have high level computer with big ram more than 40gb and gpo card...great video but app not working for all viewers..

    • @TirendazAI
      @TirendazAI  Před 3 měsíci

      Thanks for your feedback. I'll take your comment into consideration.

  • @denisprodhomme
    @denisprodhomme Před 4 měsíci +1

    Excellent !!!

  • @AliAlias
    @AliAlias Před 4 měsíci +1

    Awesome ❤❤❤

  • @kuliah-it
    @kuliah-it Před měsícem

    nice bro. but i got problem, when i press generate button, i got this error:
    APIConnectionError: Connection error

  • @matthiasyotiix2439
    @matthiasyotiix2439 Před 4 měsíci +1

    Great video ! I have a setup on my local streamlit but I will deploy it on AWS to keep it private in my company. But how to handle the problem of the logs and the plotting of chart ? (Because it's locally stored) I would like to know if someone already try to deploy such an app. Thanks

  • @Travel_with_iitian
    @Travel_with_iitian Před 4 měsíci +1

    I am using mistral model by ollama but my application is running very slow is it because of CPU, do you have GPU in your system

    • @TirendazAI
      @TirendazAI  Před 4 měsíci +2

      Yes, I have GPU with 16gb vram. You can use smaller model such as phi3.

  • @ChunribuGame
    @ChunribuGame Před měsícem

    you genius!!!

  • @ialbd
    @ialbd Před 4 měsíci +1

    Hi @TirendazAI,
    Have been following your channel closely as very few people cover Pandas AI using local LLMs, so thankyou for that.
    Question, how do you improve accuracy? I have been using groq (Mixtral) and Mistral locally and I always find the responses to be inconsistent as the llms are generating a different code each time. Like it'll fail to generate the right response on simple 'What is the population of country xyz?' 3-4 out of 10 times.
    Whats the secret of ensuring consistent response? I have disabled caching in Pandas AI to test how accurate the llms are and I am getting disappointed each day.
    It'll be sad if I have to write all the methods/functions myself (as skills for the agent) and merely have the llm map to that correctly.
    Is there a better fine tuned open source llm for Pandas AI?

    • @TirendazAI
      @TirendazAI  Před 4 měsíci +1

      Hi @ialbd, thanks for your feedback.
      Unfortunately, Pandas AI is a black box. It doesn't always give the same results. I'm also trying several prompts to get the output I want.
      We can run open source models locally. But for now, I have experienced that Anthropic and OpenAI models for PandasAI give better results than open source models.

    • @ialbd
      @ialbd Před 4 měsíci

      ​@@TirendazAI hi again. Do you think Pandas AI is really a production ready library?
      I was reading their documentation and with all the options like train/skills etc that are required to make any llm return consistent result simply defeats the purpose of using something like pandas ai.
      If I have to write all the functions upfront, I can use function calling features of open ai/llama 3.
      Anyways, pandas ai has potential, but maybe with proper funding/backing it can be something in a year. But right now the effort to make it production ready and consistent it needs the same amount of effort of a custom RAG based application.

  • @mrsanty8619
    @mrsanty8619 Před 4 měsíci +1

    hi great, any What can be done so that the answers are in a more natural language but analyzing the dataframe, as for someone who has no idea what pandas or dataframes are?.
    you get one sub more

    • @TirendazAI
      @TirendazAI  Před 4 měsíci

      Thanks for your feedback. I think that to benefit from the power of generative AI, it is necessary to have basic knowledge about data analysis and pandas.

  • @AliAlias
    @AliAlias Před 4 měsíci

    Can suggest open source LLM 7b to use instead of mitral? (like starcoder, phi, pandalytic,... etc)

    • @TirendazAI
      @TirendazAI  Před 4 měsíci

      I recommend the 7B models such as Llama2 and Gemma. Depending on your project, you can select a 7b model. For example, you can leverage the Llama2 open-source model for chat.

    • @AliAlias
      @AliAlias Před 4 měsíci +1

      @@TirendazAI thanks for reply and your time

  • @user-wr4yl7tx3w
    @user-wr4yl7tx3w Před 4 měsíci

    Can PandasAI be used with agents like in CrewAI? Can it also include RAG?

    • @TirendazAI
      @TirendazAI  Před 4 měsíci

      For RAG, check this: docs.pandas-ai.com/en/latest/train/#train-with-your-own-settings

  • @tiolv1174
    @tiolv1174 Před 4 měsíci +1

    Nice