- 124
- 871 113
Pythonic Accountant
เข้าร่วมเมื่อ 2 ก.ย. 2019
Helping accountants become even nerdier than they thought was possible
[94] Google’s NotebookLM can turn files into a podcast!
This video shows how to use the podcast feature in notebookLM!
มุมมอง: 191
วีดีโอ
[93] Google's notebooklm is a really cool way to interact with data / files.
มุมมอง 26714 วันที่ผ่านมา
This video shows how to use googlelm.
[92] OpenAI ChatGPT w/ Canvas - new feature!
มุมมอง 21821 วันที่ผ่านมา
Canvas is a really interesting new features within OpenAI that lets you view and edit a working draft of code or some form of writing, where ChatGPT acts as your copilot while you write.
[91] Llama 3.1 does some accounting! Comparing Meta's Llama models against the others!
มุมมอง 3213 หลายเดือนก่อน
In this video we add Llama's 3.1 models to the mix in determining their capabilities for understanding accounting concepts.
[90] Can GenAI do Accounting? See how the best models do!
มุมมอง 6043 หลายเดือนก่อน
Comparing OpenAI's GPT 4o, Anthropic's Claude, and Google Gemini to see how they do with various accounting questions!
[89] Streamlit app part 3 - connecting to OpenAI API
มุมมอง 1433 หลายเดือนก่อน
In this video I show a simple application with connecting to the OpenAI API.
[88] The AI Accounting Games - may the smartest model win!
มุมมอง 1843 หลายเดือนก่อน
Get ready for the ultimate showdown! In this video, we put four top GenAI models - Claude Sonnet 3.5, Meta Llama 3.1, Google Gemini 1.5 Pro, and OpenAI GPT-4 - to the test in an accounting knowledge battle royale! Can these AI powerhouses handle the complexities of accounting? Watch to find out! I'll guide you through the results, highlighting strengths, weaknesses, and surprises from each mode...
[87] Building a Streamlit Python application - part 2
มุมมอง 1.1K3 หลายเดือนก่อน
In the 2nd video in the Streamlit series, we build our own application that does a few basic things.
[86] Building a Python Streamlit App - Part 1
มุมมอง 6433 หลายเดือนก่อน
This is a series where I will walk through how to build continuing complexity streamlit applications in Python. I start with a basic hello world, and will soon add Generative AI, building up to some interesting use cases!
[85] Claude Projects + Artifacts = cool interactive financial dashboards!
มุมมอง 3513 หลายเดือนก่อน
In this video, we explore projects in Claude, and use the artifacts to create a nice looking interactive dashboard without having to do any coding!
[84] Use GenAI as an accounting tutor!
มุมมอง 1043 หลายเดือนก่อน
In this video we look at one of Ethan Mollick's useful prompts that creates a tutor for students based on whatever topic they need.
[83] Making accounting video games with Claude AI
มุมมอง 4344 หลายเดือนก่อน
[83] Making accounting video games with Claude AI
[81] Can ChatGPT tutor me on CPA exam topics?
มุมมอง 2565 หลายเดือนก่อน
[81] Can ChatGPT tutor me on CPA exam topics?
[80] GenAI for teaching accounting through a simulation is AWESOME
มุมมอง 5205 หลายเดือนก่อน
[80] GenAI for teaching accounting through a simulation is AWESOME
[79] PDF Invoice Data - GenAI Image Recognition vs Text Extraction!
มุมมอง 2.2K5 หลายเดือนก่อน
[79] PDF Invoice Data - GenAI Image Recognition vs Text Extraction!
[78] Read multi-line PDF invoices into a pandas dataframe with Python!
มุมมอง 9205 หลายเดือนก่อน
[78] Read multi-line PDF invoices into a pandas dataframe with Python!
[77] Use Selenium and Pandas on Google Colab to access rendered HTML tables!
มุมมอง 3765 หลายเดือนก่อน
[77] Use Selenium and Pandas on Google Colab to access rendered HTML tables!
[76] GenAI Personas for Accountants - the Tech Architect
มุมมอง 2207 หลายเดือนก่อน
[76] GenAI Personas for Accountants - the Tech Architect
[75] GenAI: Your AI-Powered Accounting Work Coach with IMPROVED PROMPT
มุมมอง 2807 หลายเดือนก่อน
[75] GenAI: Your AI-Powered Accounting Work Coach with IMPROVED PROMPT
[74] GenAI: Your AI-Powered Accounting Work Coach
มุมมอง 2147 หลายเดือนก่อน
[74] GenAI: Your AI-Powered Accounting Work Coach
[73] Can GenAI Critique My Accounting Work just by watching a video? Putting Gemini to the Test!
มุมมอง 1647 หลายเดือนก่อน
[73] Can GenAI Critique My Accounting Work just by watching a video? Putting Gemini to the Test!
[72] Can Gemini LLM handle General Ledger (GL) Details? No… but ChatGPT can!
มุมมอง 3247 หลายเดือนก่อน
[72] Can Gemini LLM handle General Ledger (GL) Details? No… but ChatGPT can!
[71] Mastering Accounting with AI: Gemini 1.5's Accounting Tests & A Surprise Twist
มุมมอง 4087 หลายเดือนก่อน
[71] Mastering Accounting with AI: Gemini 1.5's Accounting Tests & A Surprise Twist
[70] Unlocking Policy Insights: Google Gemini 1.5's Million-Token Revolution
มุมมอง 1437 หลายเดือนก่อน
[70] Unlocking Policy Insights: Google Gemini 1.5's Million-Token Revolution
[69] Google Gemini Pro 1.5 has a HUGE 1 MILLION token context window.. and it can watch video!
มุมมอง 1948 หลายเดือนก่อน
[69] Google Gemini Pro 1.5 has a HUGE 1 MILLION token context window.. and it can watch video!
[68] LLM Retrieval Augmented Generation (RAG) vs Large Context Windows - which is better??
มุมมอง 7548 หลายเดือนก่อน
[68] LLM Retrieval Augmented Generation (RAG) vs Large Context Windows - which is better??
[67] Custom GPTs - what are they and how can you make one?
มุมมอง 538ปีที่แล้ว
[67] Custom GPTs - what are they and how can you make one?
[66] ChatGPT can make a powerpoint presentation!
มุมมอง 500ปีที่แล้ว
[66] ChatGPT can make a powerpoint presentation!
Please could you share this code in Python with me? I am studying programming and I want to see how ChatGPT implement double-entry accounting logic. Thanks.
It's adding information and changing the narrative of what is contained in the documents. I am a Christian, and I wrote and uploaded a sermon. The sermon specifically pointed to Christ accomplishing certain things in a person's life. The voice-over totally removed the narrative of the text and pointed to the fact that it's not about spirituality but about our own inner drive. The problem is it kept saying that this is what the document was saying. Now, if I had uploaded tons of PDFs that I didn't have the time to read for myself, I would have thought that what NoteBookLM was saying would have been an accurate representation of what was in my uploaded documents.
Yeah I’ve heard someone else say that it is still known to hallucinate, so that’s helpful to know that it is not keeping honest to the document itself. It seems strange that it would purposefully change something from a sermon, I wouldn’t think there would be any specific restrictions in its instructions around religious discussions, but I have heard that it avoids talking about politics or other sensitive topics. Thanks for pointing this out!
Does it understand other languages?
Yes it understands different languages for the data sources. However the generated podcast output currently is only able to produce English language podcast. But I’m guessing that will change soon.
Sooo cool 😁
Thanks!
You are a literal Grandmaster.
How to contact you for pdf to excel project conversation?
I don’t personally take on projects but you can probably find somebody on fiverr or other similar sites to help
@@PythonicAccountant hmm..tried already fiverr , freelance,codementor..no body was able to do it 100% correctly. So.I thought to contact you
So is the best way to use data in a secure way. By using ollama and llama3 instead of openai. And then adding csv’s or excel in streamlit and query that information locally?
I think it depends on the level of security and what type of subscription you’re using. For example open AI has an enterprise subscription option that allows you to turn off data sharing, and there is even a federal government environment version that is allowed to be used for sensitive government data. So yes the local models will allow you to keep your data locally, but some of the cloud options can just be as secure.
Loving the series❤
Yay thanks!
As an accountant in my daily life I also tend to compare the models but unfortunately I only have paid subscription on ChatGPT. I find Claude very promising though. I feel like combination of ChatGPT and Claude would be nice
I’ve been very impressed with Claude!
How can we implement this solution to work with loads of data, without uploading it manually but using a API
Yes you are asking the right questions now! I was planning on doing some videos on working with the API so I’ll try and make sure to include one or you can automate uploading and extracting information from invoices!
@@PythonicAccountant Did you manage to make it work?
Upon trying to run, "!pip install pdfplumber -q" ERROR: Exception: Traceback (most recent call last): ... ... (tons of red) Couldn't progress
Oh the trace back errors, so much fun. What environment are you trying to run this in? On your desktop or in Google Collab? If desktop, you probably need to try it without the “!”
Have been using Claude projects to build a banking salesperson proforma web app (front and backend). Couple findings worth sharing. I find it’s best to put in the project prompt a chain of thought prompt block. I also periodically update the files created back into the project knowledge and start a new chat within project to keep its context fresh. And the every major iteration I ask it to generate a readMe file summarizing the project with a mermaid flow chart illustrating components. Also had it output python code extracting the project file hierarchy (that I feed the results of back into the project knowledge).
These are great tips, thank you for sharing!
Your videos are awesome bro. I'm trying to move from a staff accountant role to a senior account role.
Thanks! Good luck!
Thank you for this video!
Thanks!
Please Ihave many invoices each one with different structure of line items, sometimes you find first description qunatity ...
Very good
Thank you!
i passed out while learning regex💀
Sounds like you really like it!
Amazing video! Is it ok to send confidential data to openai API? Does it store it or reuse it for training?
I wouldn’t unless I got permission from the data owner and if I was using a private enterprise API with OpenAI
Hello, can you please help me find my social security number?
You can contact the social security administration probably. Good luck!
AI will not replace me AI will not replace me
Oh hey there Bart Simpson
Noiiiiiiceeee
Thanks!
Kinda off topic, but relating to your last video using ChatGPT to parse form fields..... I have been having success with using the API in Jupyter lab, with GPT-4o, by first base64 encoding the image, and sending the base64 as an attachment to the prompt, and in the prompt (example)'"Extract the permit records from the provided image. The first line of a permit record starts with 'Permit' and the last line start with 'Notes'. If a value is not present, provide null. Use the following structure: {\"Permit\":\"\" and I gave it 15 or so columns in json that were 'unstructured' data but a table nonetheless= a page can have 5 records, that have 15 columns, and each 'row' on the page is a mini table with other nested tables..... it will pull all the records out as json. you could replace the 'named field' = First Name : John Doe with 'semantic analysis' dropping even expressions if you chose to. You can add 'multiple' pages to each prompt as attachments. for each group of 5 pages it was "created": ____, "model": "gpt-4o-2024-05-13", "object": "chat.completion", "system_fingerprint": "", "usage": { "completion_tokens": 4096, "prompt_tokens": 1399, "total_tokens": 5495 25 page cost me something like .52 cents in API usage (I dunno, I was having it create fictious articles too, to see what it would do 'about the data ' article wise) too, so the token count may be off for the final $ amount. better yet? this works on Llama 70b, on Groq, with jupyter lab and a local RAG to vectorize the page/image on the fly..... so this is coming/here for local RAG
TY 😀
You bet!
Wonderfully explained, thank you so much.
Thanks, my pleasure!
This is very good, I have a project to extract the PDF document which has multiple headers and multi line data. And I’m following your process and GPT advance also but I stuck in some cases. Would you like to connect with me Sir, that’s will be very thankful for me.
I’m glad it was helpful!
hey! nice video, simple and straightforward. Is there a way that we don't have to insert every time the html file for a specific company and instead just type the ticker symbol and we can download the data from it? I saw something with Edgar tools but they don't have all the rows. Thank you very much!
There should probably be a way that you could do this, I would have to go back and look so maybe I’ll add as a future video
This is great, was having GPT coach me through a PyTesseract & spaCy variant with Named Entity Recognition. Do you have a GitHub or something with this code?
That prompt is massive, lol. The model processes it with every. single. message. the user sends. Even when you just enter "2". No wonder OpenAI is losing $500 million a year.
Good point! Do you think it’s not worth the cost?
I found that by opening a pdf file with Mozilla Firefox and inspecting it with the developer tools you can collect its text (with the help of JavaScript) after the web browser has converted it to HTML and maybe save it for further processing with someone programming language.
Yeah there are quite a few ways to get the text from PDF file, it’s just a matter of whether you need it to maintain information about where the text is on the page, and if you need to create an automated process versus manually clicking, that’ll impacts what method ends up being the best.
You know, I started watching your videos years ago with pdfplumber and forms. And to be brutally honest, I had not even created a conda env, or even known how to install packages. I really had no choice but to learn how to do it, and 'getting stuff out of a pdf'was the reason. Largely because on the average month right now, I see 300 different pdf files, with different formatting, that can be 1 page, or 1000's of pages. Pretty much all unstructured text (without field names) still meant to create a table, or a 'row' that is a record, that is mini table of unstructured data (if that makes sense) Using AI locally as well as Chatgpt and now Groq 'Llama3 70' it's become really , in some cases easy to say, ' I exported this with this block of code (paste code block) and here is a sample of the text output (paste a page or two), IN THE NEXT jupyter lab cell, how do I parse the txt into these columns (paste the columns) Attached is i screenshot, tagged with the key elements I am looking for in the pdf page thats now text' Annnd it will spit out code. You may have to hammer away at it, and keep pasting 'error outputs' after running code, ..... but it WILL figure it out. I think the key here, is not all python packages are equal.... pdfplumber is an unsung champ, but pymupdf and other packages have strengths. going back to 'I think the key here', what I mean is, knowing what to import to open the pdf to maybe 'how do I get it out of this, into this' so I can parse it more reliably, and even automate it. If you google = 'Invoice or Bill Custom Parsing using Kor (LangChain Extension), Generative Language Models & Prompt Engineering (Part 1)' And take a look at what he is doing, it's similar to what you are doing here. The difference is you can use this with local models (ollama, LMstudio, Jupyter Lab ect). I see you (so am I) poking at the 'well, they say these things (AI) can 'see'...can they? With just 16 gigs of RAM, you can run the 7b models locally, and (try out the google search results) with some of the recent ollama ready models, they are pretty nuts with vision capabilities. I'm really starting to wonder if the future just isn't every body training either their own 'form/pdf' data on smaller LLMs like Mistral 7b, Llama3 7b, or really, any of the 'Phi' models from Microsoft. If it's just named entity type stuff..... a BERT model could be retrained on this. It's just become so cheap to do it, and the models are small enough to where even if you had 50 different trained models ( first class, Open Source AI models like Mistral/Llama/phi) on specific form data, the over all file size (and that it is 'local' = free) of them is moot, becaue if you can drag/drop a pdf file into a context window (or command line) and have the model output a json formatted response? Lol, thats a win, even if 50 models take up 600 gigs on a m.2 hard drive. It's less than $100 for a Terabyte m.2 ........ lol, with the rush for everyone to upgrade and play with AI, has the idea of 'parsing with expressions' evolved into 'prompt templates, vectorized data, and custom trained AI models'?
Great video, do we need to pay to buy tokens outside of the standard ChatGPT subscription for the API key to work ?
Yes but it’s pretty cheap if you’re not hitting the APIs too much. platform.openai.com/docs/models
It would have been easier to have pymupdf crop the page, and export it as text, preserving the line spacing of the text to a txt file, and read in the text file with pandas to treat each line as a row, using line spacing to map data to columns.
Nice, probably right but interesting to try using GenAI. The traditional python parsing method is complex still since it’s multi lines so GenAI is a nice way to make it easier to automate.
@@PythonicAccountant If you look at who is leading the pack right now, Microsoft , with it's open Contributions to 'Ocr, form Recognition, ect' with tools like (google this :"LayoutLM") Layoutlm, from microsoft, these are some of the foundational transformer models for data ingestion and AI..... Lol, microsoft just went all in with AI and OCR last week with that announcement of ' ReCall' on windows. it's just taking hundreds of screenshots a minuted of what you do in windows, to be able to 'rewind' your operating system in 'time'. All ffrom Screenshots, it creates and OCR's
The reality is, most pages that have 'in demand' data in tables are using heavy javascripting on the page . 'Selenium-Wire' (different from just 'Selenium')will catch the important parts though. pandas will read the html tables too. Rips right through it.
Thanks I haven’t heard of selenium wire! I’ll check it out
@@PythonicAccountant When you use 'Selenium-Wire, it's catching all of the 'network responses' in the background . If you google 'selenium-wire network scrape data' you'll see how to find the data in a specific response url, (usually stored as neat an tidy as json) but other times it can be html in the response. But for those 'dynamic tables and pages? Yessir. Selenium-Wire. I used to follow you a lot 'before AI', with your pdfplumber videos. I've been noticing if you can get pymupdf to extract text, and also 'preserve the line spacing' from a pdf? It's pretty easy to use pandas to go through the text results, and use the line spacing to ''data map' , mapping rows, and line positions on those rows, to columns and rows on another temp df When you look at 'most' pdf's, it's almost as if there are 3 'columns' of data going down down the middle of the page, where there is not overflow from one column to the next..... this is where you can get it into a form to go to town with pandas and data mapping
@@PythonicAccountant Have you ah.... 'saved a pdf to an html file' and tried to parse that with pandas yet? It's kind of an interesting workaround, whe you have unstructured data, and possibly a pdf what was created with any indexing. You can drop the html file into chatgpt too, and tell it what selectors you want, and it will scrape tables out = give you the pandas code to parse things out.
@@joepropertykey3612 that’s interesting, does it actually work?
@@PythonicAccountant pandas reading html from a pdf? yessir. It's just another tool in the pdf arsenal...if I can't do it with pdfplumber simply, I look at pymupdf, and how I can convert the data to something more simple and structured to parse.
Hi PA, thanks for the videos. Can I ask, are you also CA or CPA? Or are you learning accounting concepts while programming?
I’ve been a CPA since 2015, have many years experience with financial statement audits, tax prep, and advisory work around audit readiness and accounting and internal controls. Self-taught in python over the past 12 years. So started with the accounting domain, then super powered it with python and now GenAI.
Question from a aspiring data scientist: How did you go about finding and fixing the problem that occourd in the last video? When it didn't work for me I felt hopeless and like my project wont continiue for a long time like the last time I ran into a problem. How did you manage to find an alternative/working way? I am very impressed by your skills of not only finding and fixin the problem but also putting in effort of making it avalible for everyone and even going about making an instructional video explaining it. Today I'll celebrate you my friend. Sorry for my bad English, Greets from the Netherlands
Thank you for your message and watching my videos! So short answer is previously I would’ve just googled it, but now I typically will go to ChatGPT! The first thing I will do is copy the error message and paste it in to see if it has any suggestions. I realized quickly that it was likely Just the perimeter is getting passed in and tried removing the first perimeter as one of the suggestions from ChatGPT had indicated. As far as your comments about feeling hopeless when something goes wrong, that’s totally normal! For me I am pretty stubborn and also a bit of a hacker mindset, so I usually Assume there is another way to do something and will work very hard and try many different things before I would eventually give up. Having that level of commitment and trying over and over again usually end up working out well for me, but I also usually learn many things along the way. Try it out! Next time you run into a problem try solving it and a bunch of different ways before you give up :-)
I am curious what OpenAI model you are using in your API call. The reason is that when I screen shot a block of your PDF and submit the screen shot, I am getting 100% accuracy in the data extraction. I am using the 4o model.
Also using GPT-4o - that’s great it works for you! Maybe I need to use yet higher quality image!
How about a link to the PDFs you are working with so that we can run our own approaches and see if our tools will get different results.
www.tabs3.com/support/sample/apreports.pdf
Whoa this is so cool 😲
Thanks! I agree!
Nice could you please provide code link
colab.research.google.com/gist/danshorstein/87d3c0ee59cf5e321a4e307aecfd1e83/read-pdf-in-memory.ipynb?authuser=1
thank you for the guide.
You bet!
thank you!
You're welcome!
Superb detail and very straight forward. Thank you for showing me your workflow and insightful guide to parsing semi-structured data
Thanks!
Thanks man I'm having a really hard time with this video called "It's super easy to use Python to scrape webpages for dynamic tables!" If I run the script in your WebScraping.ipynb it gives out errors I have to find to fix. Is there an updated version?
here ya go! th-cam.com/video/cgo24I9NfV0/w-d-xo.html
is it possible to read read pdf from online location like google drive, sharepoint using python without download pdf
yessir! check out th-cam.com/video/8JDQMW7PuUY/w-d-xo.html
promo sm 😩
Hey man, you helped me so much you have no idea. I’m struggling to add a feature to my code tho, could you help me out?
Ask ChatGPT :)
Hahahaha I’ve already done it but he couldn’t figure it out, tks anyway
Respect! Great video, super explanation.
Thank you!
its not scanned pdf file