How to mask ip address as a url

I am exploring HTML and streamlit and hit a roadblock. I have a flask app that redirects to index.html

Flask code:

from flask import Flask
from flask import render_template

app = Flask(__name__)


@app.route("/")
def hello_world():
    return render_template("index.html")

In HTML code’s body I am redirecting the user to a streamlit IP address http://xxx.xx.xx.xx:8501

HTML code(index.html) :

    <div class="links">
      <a href="http://xxx.xx.xx.xx:8501" target="_blank"
        rel="noopener noreferrer"><strong>Demo app</strong>
        <span>Analysis sentiments using ML</span>
      </a>
    </div>

The flask app is running live (URL changed) https://stack-demo.com when I go to this web page and click on div, it redirects me to http://xxx.xx.xx.xx:8501 I don’t want this to happen.
xx.xx.xx.xx:8051 is a entire web app in itself. I want to replace this IP with string https://stack-demo/demo1

The app on http://xxx.xx.xx.xx:8501 is hosted on streamlit

How can I do this?