Made a get_analysis function to call in app.py