5 ms·
I tried something that I asked chatGPT 4 and it failed. It tells me to look at the console for errors. What I did was copy and paste the text output from Beauti
by Inebas 3y ago
I tried something that I asked chatGPT 4 and it failed. It tells me to look at the console for errors. What I did was copy and paste the text output from BeautifulSoup of a website and ask it write a python code that cleans this so it's easier for a machine learning model to handle.
EDIT 1: I then simplify the question and set it to expert mode. I ask
```
given some text after it was scraped by beautiful soup.
write a python code that cleans this so it's easier for a machine learning model to handle
```.
I then copy and paste the output into the additional context section.
The code it gave me was how to use beautiful soup and to remove unnecessary white spaces. ChatGPT gave a more thorough answer which is to use some regex to clean the text.
EDIT 2: Got it to work better by setting it to expert mode and copy pasting the whole thing. It truncates a lot of the text and missed the question at the bottom. Then, after it gives some generic answer. I asked the question on using python to cleans this so it's easier for a machine learning model to handle. It gave me a much better answer and with the links on where it got it from.
Very cool tech. I'll be trying it a lot. Thank you.
- rushingcreek 3y agoDid you try using Expert mode?
- Inebas 3y agoI edited my post with more details.
- rushingcreek 3y agoAwesome. Glad it was better. We still have a lot of work to do :)