Hey @shakasom,
Your setup.sh looks like it’s creating the ~/.streamlit/config.toml file successfully. It’s not formatting that file correctly, however - you don’t need the backslashes and newline character in there. This will work better:
mkdir -p ~/.streamlit

echo "[server]
headless = true
port = $PORT
enableCORS = false
" > ~/.streamlit/config.toml

This isn’t the issue preventing your app from launching, however - that looks like it’s likely due to conflicts in your Pipfile.lock. (A side note: there’s no reason to have both requirements.txt and Pipfile/Pipfile.lock in your project - they’re just two different ways to declare your Python dependencies.) I’d suggest removing both Pipfile and Pipfile.lock, and just using requirements.txt instead, for simplicity’s sake.
I’ve created a sample Streamlit-on-Heroku repo 142 that you can check out if you’re still having trouble. It’s mostly equivalent to what you’ve done, but it specifies a Python 3 runtime, has a simplified requirements.txt, and doesn’t create a credentials file, which is actually unnecessary (though there’s no harm in adding one!).