TensorFlow 2.0 or PyTorch is properly installed and available to your script

I am trying to build a sentiment analysis model in spaces using streamlit. I have the code in my app.py file, and have made numerous adjustments in the terminal at the direction of chat gpt and google bard. chat gpt is diagnosing my problem as “The problem lies in ensuring that TensorFlow 2.0 or PyTorch is properly installed and available to your script.” I have downloaded both via the terminal, adjusted the code accordingly, and i still am getting errors.