Hydralit components - Modal only works on localhost, not in deployed apps


I’m trying to follow the implementation shared here on the hydralit modal pop-up:

And the modal pop-up seems to be only working on localhost, but not when the app is deployed?

In the experimental section they mention this " NOTE: You need to force reload (browser refresh) the entire page after the experiemntal features have been enabled (you will see a notification in the terminal) to ensure the additions have been loaded into the web page."

but how can I force reload the browser to inject the components? And is that even the issue?

import streamlit
import hydralit_components as hc

modal_code = """

  .btn btn-primary {
    background-color: #31b0d5;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    border-color: #46b8da;

  #button {
    position: fixed;
    bottom: -4px;
    left: 10px;

<!-- Button trigger modal -->
<button type="button" id = "button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal">

<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel"> Legend for charts and tables: </h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
      <div class="modal-body">
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>