Yep, it’s great, thanks again!
Only thing now is that as I’m testing the Google NLP API, I’m absolutely through the roof with my credits!
Not that it’s crazily expensive per token, yet when the script is triggered 100’s of times, it can be a bit costly!
As a workaround, I’m only scraping short pages and I’ve now implemented several buttons throughout the codebase, such as:
if st.button('Send Request to GCPs NLP API - both URLs'):
… allowing me to break down the process, yet there may be better solutions.
I did try @st.cache(allow_output_mutation=True)
on related functions, yet no luck, as it’s throwing the UnhashableTypeError
error
Another thing I may need to try (tomorrow, as it’s getting too late now ;)) would be to store the API results into a variable and only pursue my PoC from the results stored in that variable.
I’d certainly be keen to hear about any workaround
Thanks,
Charly