 Yeah, we should be alive This shit is quickly Twitter calling it Twitter Because it will be always Twitter. We also do LinkedIn so pretty active on LinkedIn if email doesn't work for you post this Check a stream. I can't hear myself. I don't know Because I Had my volume turned off So sound should be okay. I can't confuse. I have two similar pairs of Jabra headphones One I use my phone and I want for the PC but they are Almost identical So I get keep getting mixed up a between them That's not fun Again, it's jump straight into it We're doing the CCG feature extraction currently in production. We have this old tool that doesn't work anymore It's even loading forever That's probably because It's actually taking interior shouldn't work at all But that's okay. We'll fix it We are fixing it now so what the image Is there because we We're actually in a default GPT option, so I don't know what's Actually could be quite interesting if I can feed it back The tools that's what we Have in the moment, but we haven't implemented some changes the good thing about GPT They keep changing stuff the website keeps definitely keeps changing I'm not sure if it's good or bad I guess it's good until it will Just vanish the whole site or the whole company don't know I think it's highly likely We've previous Microsoft acquisitions for them to just shelf the company So it's not far fetched but Yeah, if they play the cards well Anyhow, it seemed to Now remember the context because I came back to it after about like half an hour Break and it still was able to generate stuff for us before it will generate some rubbish Essentially losing all previous contacts on out seem to hold the context and previous conversation for a bit longer display so So pretty it started the One reason things didn't work. It started generating a separate HTML file So when you hit on there, so you have some parameters when you had the generate plot it will go to ECG send an API post Request if the parameters that wouldn't work It was trying to generate a separate Chat in a separate HTML and now we put them back to give So that should be the index HTML now in In a Python code we should be calling index HTML image Red redirect. No, so we don't want to redirect You want to stay on the same page We have generate ECG plot Okay, we'll need JSON file from flask instead of redirect So that error message is gone. We still have the generate plot That it keeps also saying that I do not need JavaScript I have a reason Did a few updates. You can also read the plot image directly in the same page using flanks and ginger So I think we okay Using JSON file Okay, using this code It's just that Right, so it looks like you're trying to Integrate both approaches sending JSON as a file Yes, we need to get rid of some stuff I think we might need JavaScript later Can we modify the whole code to include Script JS Let's see what it does Can use just script jQuery Simplicity handle the submissions and update the image on the page without requiring full page refresh. That's that's good Yeah, we don't want full page request every refresh right now. It's updating all the files Says all the code here remains the same Not sure I have that bit with JavaScript as well, whatever that does The art of copy pasting check that we Have the correct file the previous one wasn't working. It also might as well get rid of it Flask application HTML just script about the whole script for HTML can we can get rid of that copy? Just need something working to start with yep, that looks all cash 54 lines We have 40 save that can we also generate the whole Python script I assume it knows we only have one file That's we're using JSON file. That's great. It's no placeholders or missing code so far We're generating Saving figure What's the alternative to the save? image to saving Saving the figure So the same figure can convert the plot directly to base 64 string using my plot leave print figure method figure. What did we use? for previous applications, but so far we have the ECG signal generator It's working quite well. We do like that. That was using ECG was using NumPy into JSON Instead of saying the figure that we're still saving to file Is it possible not to save the figure to file at all? Don't like files Save the figure to bytes. I owe buffer in memory save the figure code the buffer Code is the plot not saved to file on disk, but this directly converted to base 64 string Okay, first we just need something that works. We can change Change things later this file Everything happens in memory memory in the browser to the server So I'm the server. So it is saving to file my server When generating a plot Using the approach I described the plot is not saved to a physical well instead temporarily stored in servers RAM, but I don't want to use RAM. Do I want to use RAM? The button rather is then encoded into 64 send to the client browser For display Is it possible to render on the client's side? Server load it can reduce the load of the server allows real-time interaction That's nice Not all browsers or devices may support their quite were required technologies. So so yes, so there's generally a Compromise between me doing most of the server which I have to pay electricity for or Using your browser. So you pay the electricity bill So Yes What my first choice would be Okay, so it's processing on the client side generate html Took us a while while I didn't Really know what's what? Yeah, so this is more similar to the previous application that we had Just great. Okay. Why is the script? Okay, can you with processing on the client side? generate html JS, I don't know if it will Able to do it all Probably not in one go That can be it again. Okay. I have to check my previous app because their Python script was definitely not this short I Have the index to and then this script. We already had this Okay, can we really do the whole thing? We'll do some processing on the server and some on the client's side all the maps the calculation should be done on the server and Rendering of the chart Would be done in the browser using JavaScript. Yeah, let's see Getting confused. Yes. So the flask application is Python script is using JSON. It's generating the data sending it to the client side and JavaScript then Do does all the plotting it's using both plotly jQuery JavaScript, that's fine. Just need the code to be complete. Sometimes it will just forget things Okay, let's update this Didn't really have anything had anything working is So far might as well get rid of it So eventually it will be similar to this application except that they different components of the ECG waveform labeled Now with different colors or just dots on the peaks and troughs for the PQRST So it should should look Like close this something like that. I don't know what happened there, but there's some noise variability in it obviously Still labeling Yeah, those are a bit off so I have to correct them later, but first I thought we'll publish something Put something in production so you can play with keep some give your feedback Your feedback is very important to us to us I mean me and chagept Okay, so we can Flask server handle the ECG data generation and processing. That's right Okay, we really had already had this Are you ignoring stuff I did before Change the extraction the XHTML No, no, no, no wait a second. What have changed this file? Okay, we'll save that Check if it's working again Right, that's the working thing Just do this we need some work Test copy working. Well, I can Remove all those from memory It didn't work that well This one does Our publication this should be just a template there's no major errors here HTML no major is there JavaScript is to 25 lines of code. That's 35 See if we run this Okay, so first See if we have the plot Where is the body plot and it's the form that's the plot Can barely see it. It's almost not there We'll make it with bonus act already CG gets a 500 there Why all right, this is why so we essentially missing calculations in there. It's okay. They can stop generating Let's take sure Problem is here They are integers already on there. It doesn't really matter because we don't have the calculation The calculation should be in this Python code So let's stop it for a sec. Stop it for a sec Let's say sick I said second Okay, the speech to text is really bad. How is it my voice? one of the other It's not working. I have to speak more clearly for the robot to understand Yes, now it's working, okay, but I cannot be talking like this all the time Yeah, we have the code Yeah, that does the calculation We have the ECG simulate duration sampling rate heart rate so on so forth That's nice also need to do Processing can we can we combine the current Python script? with this one and let's see Combined two codes So this is the code that we actually want to use it's Can integrate processing From the private script into the Flask app then return the process data client side for plotting the client side will be Responsible for rendering the plot based on the process data sent to the server seem legit That's good. Yeah, one of those is variable is variables as well Well, we can do it later. We still haven't got anything working and Why do I have a feeling something is still missing? Process, that's right Yeah, there's this big four For every our peak to this removing duplicate Don't think that's actually a problem. So leave it's okay Let it get rid of it. Copy code Copy code 5754 Okay, this would not close this for a sec Right, we need to adjust the Java script Please generate the new Java script leave all the necessary Code I need to Regenerate the html code as well. So the new JavaScript The success function what this is success function doesn't sound like a good name. This is No, it's a success What? What's that all about? Yeah, JavaScript We have a new JavaScript used to be 34 lines. That's like 75. That makes more sense Do I need to regenerate? HTML just put a question mark at the end for Indicating that we are not sure Here's the updated index HTML. So we're using both the JavaScript That we have then just from jQuery and just from plotly might need a copy of those I'm sure you'll be able to find them in all sorts of repositories even if they disappear from these websites, but still nice to have And I don't think the HTML change much anyway We had 32 and we have 34 That's okay The app again. Yes to not not do not use in production came still Not generating Something with the variables that is out of proportion or something stand This year all about Because the length value Is not an integer Yeah, that should be a simple fix shouldn't it right now bite and cold Wait ceiling must be They rounding it upwards towards the ceiling Then in generate ECG Duration float integer right round up the duration to the nearest integer Okay, still we would not work as it is, but Okay Try again Don't understand why all the errors as if No one have done this before By 25 copy from here Copy pasting is a skill isn't it? You need to know how to Watch typically occurs the problem serialized So we need to serialize before we turn them to Jason objects rate because above It's turning it to least We actually want to get rid of those the magic numbers turn them into variables so you can select them on the as the input Parameters But for now Convert convert numpy rate to least Okay, and the rest of the code that ECG to list Isn't that the same? Why am I? Converting twice And maybe it's not the same I can just consider difference Okay Still having issues. What's up, and everything we need to update this does CSS because you're trying to buy you the re negative operator to at least Replace this line clean vetting stuff. Anyway Find native peaks for Q&S and we need to in that just find the negative peaks three we Just go with the fall for a sec Summoner gets something Running to understand why we need to do it. They complete that that part would be blah, blah, blah I think to convert least to at least a game Yeah, I was Just removed the list List like this It's become becoming ridiculous. We should have to list only once think We have a two wise Segment ECG to list they see And truly CG is also to list We had it to begin with so To list to list to list Still getting an error. It's a long one Trace back trace back Back. I see because there's not be no pie in 64 type in your data. Jason doesn't know how to handle this data Yeah, we had similar problems before You need to convert the numpy integers to Python native integer type before passing them to Jason fire and data points then point Do we need to do all this? Point point point that points Ooh This is the same Same Yes Jason fire data won't give me something. Okay. No, it's working. Oh So question can now we can move on it's only 47 minutes First Heart rate say we had three Was free to small But for Three shouldn't be too small. Okay. Keep it for whatever. This can be 250 Don't need 1000 whatever it was Okay, labeling is not great. Is it I don't come that float man to integer what it's not There was a glitch there in the Yeah over there. Yeah, what's up there? That's not great What is so many of these labels in the caption? Okay, can we have the plot Can we have the plot displayed and labeled as soon as we Load the page the first time. Also, can we have the chart? ECG plot updated when the values input values are Changed by the user I find the Javascript and hdml This is the whole code Intervent listener Can be the whole plot Charscript 75 lines script.js This is not their whole code Can possibly be 75 lines this one looks like 20 or 30 or so Let's save that in hd the form I've changed and just gave it the name I did or you had an ID Yeah label ID Anyway, we need this for sure Why is it? Not showing a chart Chart is not showing All right because something is missing It's not the whole code come on Provide the Javascript code is complete and should work for new case will update ECG plot as soon as the white page loads and also whenever to use There are no errors in console, but the chart is not displaying anything anymore There's nothing to troubleshoot. It was doing in a second ago Nothing to troubleshoot. It was Doing it with the previous jason script. Come on. This is not it getting confused Oh come on It's now getting all mixed up might take five. There is nothing in the chat Oh come come back to it