 We are live and not early, not yet Should be live Quickly share this. I don't know how to do it prior starting the stream Which is unfortunate did you learn? Okay So jump straight into it or any intros Later especially if anyone else what is it you are doing more than happy to go over it continue the ECG feature extraction web application Let's see. So it should look something like this But we're where the different ECG waveform components are being labeled Hopefully as accurately as possible There would be more inputs to play around with So you can see if you can Improve performance on a specific ECG signal. So that's generally what we are trying to do so We had that code Generated by chgpt We've been testing it quite a bit modifying it quite a lot So that works yeah, we don't like any magic numbers so these numbers will be inputs In the web application, but some other numbers like this one here Essentially any magic numbers in there It would be Yeah, I don't know why this hundred fifty is just not a variable Should be a variable really It's actually get Let's see. Yeah, I'll do it on our actual application so we did get the bot To turn this into a web application And this is what it looks like some reason Yes, obviously this button needs to be pressed every time This value is not changing that so there's a lot of fake things to fix Let's do them quickly So you see here it's talking to the server. Let's see the any errors Yeah, the favicon sort out latents That's okay There are no errors which is good doing this literature little review Using this plug-in in chgpt What's called something that this be a scholar AI Yeah, whatever the name is it wasn't great when I previously checked it hopefully it's improved by now and gave me and Overview of about eight different papers From various years. Obviously no one has time to Read all papers the original topic is How did you know filtering of ECG signals can cause means diagnosis? so it found a bunch of papers on the topic Which has essentially ECG filtering a Rhythmia techniques power line interference removal So I thought to continue to find some more Comparison of ECG so those papers actually Legit you can actually go and find them. It's not like GPT used to just make up References This Eddon is actually searching Google scholar now. How good is the summary is still to be discovered These are the fractional filters New time varying adaptive filter system Not sure what's that about real-time filtering and ECG signal processing based on dual core digital signal controllers Yeah, anyway, now it's a supposedly summarizing The eight papers so you can write the lead review for you But yes, you have to Digital filtering methods and charging adaptive algorithms and compression compression You think you will not need a compression for one or two ECG channels at whatever Sampling rate they're coming through and by the way, this sampling rate is too high Yeah, we don't need it to be a thousand especially not more than a thousand could be around It to 50 And they have a good thing now with a change in PT is that it was able I was able to just upload the image of what it self created and it's giving you So now it knows what the web interface Looks like and it's giving more suggestions. So it's it's picked up on the legend repetition Which is correct and it's trying to fix it over here And we'll see how does it in a second Changing the JavaScript So we're right. Well, it's already created a web application for us. It's a flask Application using New York it to choose open source on github and numpy math just for the ceiling function and It's actually kind of forced us to do it because Jason file It needs that kind of thing Yeah, the other thing in the code so should have another file which is a Prompt oh Yeah, call it info or whatever. So we want What do we want? Yes, so we have this Python cause working okay, but it's not a web application just to stand alone Python script Then we have this fast application But it's improved improving some improving quite a bit of improving in the app So say yeah this hundred fifteen needs to be turned into a variable Obviously, I don't know why didn't Just do it turn them to a variable every Where you get a piece six times So, please do that. What else do we have should have other thresholds and time Essentially, we're looking at Yeah, these timings for the detection This one by the way would not go below to give an error That the segment is too small, I think four is actually the minimum for the analysis to work So the what's the signal oops and K Yeah, we're using the New rocket Several times. Yeah for this to work for this to work There is a minimum signal duration Of I think it's all that here because We actually need it in For it's the previous thing. Yeah, this bit should be turned Turned into a variable Right, we still so when we're loading the page instead of let's use the Right and this one is the repeated Yeah, you get the the caption what's called not caption Individual scatter plots Instead you can collect all qrs So we'll have ensuring the disable appears only once in the legend. So the legend Fixed the legend always have to kind of ask it to Generate by the way, yes, you can make spelling mistakes with a judge, but it will get you anyway I think Okay, I don't actually need to monitor my son Which is good with all So fix the legend Should we turn it available? And what else do we need to do? So the other question is how come? The main question actually It's only does q s peaks Is it because the our ones are being ignored Yeah, we only have negative peaks So they're working. Okay And there's no fix the legend The peaks And the other peaks There are peaks negative peaks positive peaks for What's called pq rst, isn't it a p? q rst So we got the qrs We need p and t p and t waves Fixing the legend can go Down the priority list And we also Make sure the Shut loads When loading the page first time with Labels Okay, what else do we need to do? A sampling rate Sampling can be fixed at 250 Perts No need So hopefully it will just keep the variable for it, but it will just remain the same No constant can make it constant Don't Right, so we have that And okay HTML So these are new prompts Spelling mistakes are okay Why do I have a delay? OBS as well Choose segment range variable to replace the hardcoded 150 Choose logic for p and t identification and fix the legend Display the chart with labels upon initial page load Set fixed sampling rate of 250 What's my OBS like delayed by A second or so And the stream I think the stream is okay. I'm not sure to check the stream this. Is there something wrong with the stream? sort of that Way obviously this will be edited out Yes, and you don't have the logic for The wave-indentification Why still generating stuff Didn't actually generate all the code right and forget to ask to Generate the whole code Okay, let's stop generating this for a second I forgot to And indicate another important thing And we Want instead of the generate button We want this Chart to get updated when you change any Of the input parameters chart when any Input changed By the user Okay This Whilst let's try To Generate Code this The same do not generate any code Yes spelling mistakes are okay Let's see if it actually follows that last prompt Minimum signal duration yes to get meaningful value should have minimum duration of this cheat signal if you haven't modified that it's for and then Identify that it's four seconds and show you don't allow variable loader. Okay replace 150 variable Yes, we'll code segment range Find positive peaks for p and t You already have some code it takes p and t very sure I used to have it but it got a removed There's only q and s There's no t fix the legend You can trigger a form submit in the JavaScript right after the page loads The sample rate fixed at 250 Yeah, remove the ui element here. We don't need to adjust Um To adjust the sampling rate just fix it at 250 to fix What is that adaptive algorithm? No, so that's the wrong wrong window Sampling fixed up to 50 and then the chance then input changes you can add eventlessness Okay Okay, so it's actually not generating any code. That's great Index html update ajax Okay To do do this three prompts She Wait Criptures index html hopefully We want run out of prompt limit Just currently at the think 50 pay three hours or something So hopefully it will soon appear On the page You want to check any of the our tools? Put the link in the description The last one was the ccg synthetic A signal generator So this one the one we're working on today will look kind of similar That's many focusing on the options to label the signal so it should Be finding all the Different the cg waveform components That's why it doesn't change That's not 25 Remember this bug Okay, so generated the whole yeah sampling rate fixed to 50 segment range 150 by the way that Yeah, that segment rate should be a obviously automated somehow it should be just 150 all the time because it would not work a for all waveforms modified generate cg data function to use this constant made Generate make sure the generate cg function returns data points that Serializable How come There's nothing on Positive peaks That's something about you already have some code that detects these positive peak pnt waves detection in that in this grid things Yeah, you have to kind of it Kind of tells you what it doesn't want to do for whatever reason So you have to nudge it In the right direction of actually doing what you want Yeah, let's see So we have all the imports no ceiling for example Why was that gone? I don't think we actually need it. That's the same index. We have the variables now. That's great Have to generate a cg data the function called differently That should be okay as long as the Index the JavaScript is modified as well. Okay, so we have negative Where is that positive? We have positive peak Yeah, q s negative peaks they work okay. I don't know why they're combined together But it should be fine This code should be roughly the same length Yes, it is obviously Let's just stop it for a sec. We'll always be having all sorts of errors If we run it now Let's generate the whole A JavaScript first we can try running it We show we're getting all sorts of Errors. Yes, for example the generate dcg A function have changed. It's now called generate dcg data That's why this one Yeah, that one work close this for a sec. Just so we have Let's say window jumping We currently generating the JavaScript code And then we do index html I just generate dcg. That's Is that wrong? I think that's wrong It's not called Why is it calling a different URL? Okay, whatever works Yes, it's also got the 150 As a magic number. Why? That's something I don't understand Plotly I mean if it works it works The script listens for both form submission and any changes to the input sliders And it updates the ecg plus accordingly And that's okay. I still didn't get why it has the 150s everywhere Why this magic number Is so many Times presents the number of samples around Our peak where the ecg waveform will be segmented to detect and plot other peaks like qrstp qspd In essence, it's Defining the window around the epic In some sense before epic Yeah, but why is it not available? It makes calls less maintainable Yeah, no suggesting Because I asked the question. It's already knows what the problem is Beginning of the call you can define Segment window 150 Um Okay, surely it can do that for me So the code is more maintainable as You are suggesting Wait, this is important. Do we have it in python? I think it's got confused there. All right, and We already Have Segment range 150 Okay, let's just go with this one for now Lots of improvements anyway, it's currently 75 lines Oh, this is a whopping 109 You already have the fine should replace every magic number I'm feeling segment range I'm really doing it. I was asking about the JavaScript Hey, Anton, how are you? You have different names everywhere, don't you? They recognize your um um icon photo That seems like But not the name Have a great straight head thanks Can bring um Can bring people live by the way. I used to do it. I did do it a couple times Is it for you keep changing names for privacy reasons? I assume Kind of trying to do the same thing, but it's getting harder and harder I am boy from linked. That's right. Yeah, remember the icon photo if we didn't have that photo, I would not remember the Um, that you are a regular on this stream Very many if you ever want to join live as well that is possible. We can set you up Uh, so you can also tell about your work if you if you wish You can do like a zoom thing and yeah, I did it before Mixed mix success a technical some technical issues like microphones and the line, but it is possible I'm trying to get This thing to work and Need to regenerate the html code I wouldn't mention It's getting confused here I'll just go back So the chow screen we have the chow screen pressure copy pasting is a Is a skill, isn't it? Which you must have these days Right and we we have all those prompts We were using today stuff that we're trying to fix I think indeed most of the stuff correctly But now we're struggling to actually generate the whole code with all the necessary changes Sometimes we'll only give you bits And I don't actually know javascript html or python. So I'm having trouble integrating The the whole lot the html should be fairly short Yes, we're using jQuery and Plotly, I don't know if we have to download those javascripts to to the server. So I don't just in case this CDN that content delivery network, isn't it? It stops working all of a sudden probably need those files as backup or the code Why the html? The code getting longer should have something working It doesn't work generate acg because it's not called generate acg. It's called generate acg data This thing 404 because I'm pretty sure that post Requests that function is not called generate acg anymore. It's modified other stuff Yes, the root is wrong because it's called generate acg data Okay, we can change it back. Okay, just stop generating rubbish It's Generate acg data. I don't want to change it manually because It will stuff other things up It's not called generate acg data If the endpoint is not called then we need to make sure that yeah, you do But why change in Python if they will change in the javascript, right? So there are ajax ajax call and this one cg data If you have any other references, well, I don't know you tell me You modified the code Why am I talking to a bot? Generate acg data still getting a 404 y now called index html And what's the problem now? We call the same name 404 So we started for a sec We'll see close that Now we still get it get twice actually acg data Generated acg data 404 Now we got it twice because we opened we clicked on the link twice Okay, this is super weird What am I doing wrong? No idea It's a post request to generate acg data. I'm getting a 404 Have you know I will tell me to start troubleshooting I think I need troubleshooting because this should be a simple fix First because it was working a second ago last code Okay, let's forget method post Okay Why did that go pressure ahead? before Okay, let's copy this quickly Stop generating So you need the method post html html form id acg form generate acg data JavaScript To read the home response, don't you post generate acg data index By the way, the span should be changing And should be displaying what the selection was Same in a other tool here like when you change here Yes, you will expect the span value to change as well That's not happening at the moment I'm pretty sure it was doing it Surfer Hoopda Hopefully announcing the name correctly. Yeah, we're having a problem that the arguments of generate acg data Are not being passed on Change gpt solve it for us By the way, if you haven't subscribed yet announce it as Why do I have the love heart over the text in obs So I can't read the full A message Ah, okay now You pronounce it as Saar FAC I won't be able to pronounce it. Sorry So why the current application Is not working as well as this one All it needs to do is have the same display same everything But the focus is on Labeling the signal So let's see Whatever you're seeing generate acg data 100% it doesn't provide those arguments to fix this you should Okay in python In the uproar generate acg data post Method post, okay, I already have it Dev generate acg data, so it doesn't need Do you have super chat? No, I do not have super chat because this channel is not monetized Sorry for that Not thank you for asking So doesn't suggest I don't need arguments in the In the post request That's a bit odd Go with it And in arguments Okay, let's save that we're so python inside the function Inside the function get the values duration hundred from request form Assume this can be done next Like this So your function will look like that rest of the logic. Okay, let's save that I must Okay So now we have the variables. However We have another problem With neurokit which I'm pretty sure we solved previously But now we have to do it again And it's the fact that The variables are not correct Not correct the type I don't know. I'm not getting any single thing either. That's what we have a ggpt for To explain Everything to us So the error I'm seeing is originated from neurokit to library When calling the Simulate function So over here It suggests that there might be an issue with the length of the signal being passed for slicing So in a sec I increase the signal and that's not the problem It's somehow not an integer Yeah, why is it not an integer? Right, we need to run that so in duration Um, so instead of that We do this Have something working attributes strip numpy Keep getting more and more errors Big one Do I have that many lines? In It's no way But okay I think this is solvable as well message If shit indicates that there is an attempt to set the flask response times I am from australia australia You shared indicates that there is an attempt to set the flask response times using the value That's not the string or integer but the numpy numpy array This typically happens when return value from flask root is not appropriate for forming a hgp response Pretty sure we addressed this before Yeah, that's exactly what we did before and for some reason that code just disappeared So we need to turn the numpy arrays into lists Or that for our thing to work Thank you for dropping by Don't forget to check out biotechcares.com That website by the way is monetized If you were wondering Hopefully the ads are not too intrusive Only a single banner at the moment. So it shouldn't be Too much in your face Yeah, that's also should have explanations to each thing Each tool and a bunch of tools some of them do not work would try to bring them back My server was hacked into so the back end for all the tools It doesn't work anymore. So we actually had already a seizure extraction tool before Running on the side. It was an old video Describing how it all works And it was working pretty well. It was done using lab view But yes, that's not working anymore. All I left is this video this description And the empty not working Web application That gives you all these errors that I wouldn't worry about it because we now redoing it in python Neurokit numpy and flask So hopefully it should work sometime soon and I might just continue with this A bit later because we are over the one hour And I kind of promise not to have Long super long streams. So I'll see you back here in a bit just after a break