Flask application timeout

Hello, I am having troubles hosting my flask application. All of the logs show that the site has been successfully initialized but once the app.py file is ran successfully it just sits there and thinks for about twenty minutes and then times out. Any suggestions?
3:56:28 PM: Netlify Build
3:56:28 PM: ────────────────────────────────────────────────────────────────
3:56:28 PM: ​
3:56:28 PM: ❯ Version
3:56:28 PM: @netlify/build 29.36.0
3:56:28 PM: ​
3:56:28 PM: ❯ Flags
3:56:28 PM: baseRelDir: true
3:56:28 PM: buildId: 65d92284fd55296b99ec9b6b
3:56:28 PM: deployId: 65d92284fd55296b99ec9b6d
3:56:28 PM: ​
3:56:28 PM: ❯ Current directory
3:56:28 PM: /opt/build/repo
3:56:28 PM: ​
3:56:28 PM: ❯ Config file
3:56:28 PM: /opt/build/repo/netlify.toml
3:56:28 PM: ​
3:56:28 PM: ❯ Context
3:56:28 PM: production
3:56:28 PM: ​
3:56:28 PM: build.command from netlify.toml
3:56:28 PM: ────────────────────────────────────────────────────────────────
3:56:28 PM: ​
3:56:28 PM: $ python app.py
3:56:29 PM: * Serving Flask app “website”
3:56:29 PM: * Debug mode: on
3:56:29 PM: WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
3:56:29 PM: * Running on http://127.0.0.1:5000
3:56:29 PM: Press CTRL+C to quit
3:56:29 PM: * Restarting with stat
3:56:29 PM: * Debugger is active!
3:56:29 PM: * Debugger PIN: 922-280-182
4:14:26 PM: Failed during stage “building site”: Command did not finish within the time limit
4:14:26 PM: Execution timed out after 18m0.00616488s
4:14:26 PM: Failing build: Failed to build site
4:14:27 PM: Finished processing build request in 18m11.5s

You cannot run an application on Netlify.