How to automatically play an mp4 uploaded in flask app

I have a flask app with an upload button for videos (mp4), and I am trying to figure out how to get the video to play on the screen after upload. Currently, it opens a generic gray video screen, but no video plays. I am including portions of my app.py and index.html files below. I also have a predict button that I would like to be able to interact with while the video continues to play.

I would appreciate any suggestions for how to accomplish this.

@app.route('/', methods=['GET'])
def index():
    # Main page
    return render_template('index.html')


@app.route('/predict', methods=['GET', 'POST'])
def upload():
    if request.method == 'GET':
        return render_template('index.html')

    if request.method == 'POST':
        # Get the file from post request
        f = request.files['file']
        # Save the file to ./uploads
        basepath = os.path.dirname(__file__)
        file_path = os.path.join(
            basepath, 'static', secure_filename(f.filename))
        f.save(file_path)

        result = model_predict(file_path, model)

        return jsonify(result)

    return None



if __name__ == '__main__':
    # app.run(port=5002, debug=True)

    # Serve the app with gevent
    http_server = WSGIServer(('', 5000), app)
    http_server.serve_forever()
`

<div>
    
    <h4>
<center></center>
</h4>



    <br>
    </br>
    <center>
    <form id="upload-file" method="post" enctype="multipart/form-data">
        <center>
        <label for="imageUpload" class="upload-label">
            Upload (mp4)
        </label>
        </center>
        <input type="file" name="file" id="imageUpload" accept=".mp4">
    </form>
</center>
    

    <div class="image-section" style="display:none;">
        <div class="img-preview">
            <div id="imagePreview">
            <html>
  <head>

  </head>
  <center>
  <body>
  <center>
<video controls width="500" style="center">

    <source src="{{url_for('static', filename=f)}}" type="video/mp4" autoplay>
    Sorry, your browser doesn't support embedded videos.
</video>
</center>
  </body>

</html>

<input type="file" name="file[]" class="file_multi_video" accept="video/*">
            </div>
        </div>
        <div>
            <button type="button" class="btn btn-primary btn-lg " id="btn-predict">Identify</button>
        </div>
    </div>

    <div class="loader" style="display:none;"></div>

    <h3 id="result">
        <span> </span>
    </h3>
</div>
</center>