I’m not very familiar with Flask yet, but I thought it was only the web server and application framework. You would still need a process to store the current value, so that other requests to the flask server would know the current value of the slider.
Otherwise the slider is just rendering what that requester has assigned the value to. Other web requests to the flask server won’t know that original requests value.
You can use an in-memory cache within Flask, and maybe make use of redis database for storing the values, so long as you don’t need to persist the value across reboots of the flask server process.
If you are ok with losing the data during a restart of flask, redis is likely the way to go. You would then need to modify your flask app to retrieve the current value from redis, before rendering the result page show the slider at its current value.
Finally its just a matter of making the http request to the flask server from within Grasshopper to retrieve the value (I’m no Grasshopper expert, so you will need to google that one).
Your current flask code doesn’t not set up a route handler for /get_slider_value. You have implemented only /.
You’ll have to read up on flask how to write an app that does the things you want - a form of sorts with the slider that sets the value to the app, and the get_slider_value route handler that allows you to retrieve that value.