File size: 1,461 Bytes
c2ce1fe
4b286f3
 
 
 
 
 
 
 
 
e09e87e
4b286f3
 
 
 
 
 
 
3b6c4d9
4b286f3
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <title>stlite app</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@stlite/[email protected]/build/stlite.css"/>
</head>
<body>
    <!-- This app was created with KiteWind Chat-assisted Web App Creator (https://huggingface.co/spaces/gstaff/KiteWind) -->
    <div id="root"></div>
    <script src="https://cdn.jsdelivr.net/npm/@stlite/[email protected]/build/stlite.js"></script>
    <script>
      const streamlitConfig = "[server]\\nrunOnSave = true";
      const code = \`STARTING_CODE\`;
      // Mount options defined here: https://github.com/whitphx/stlite/blob/main/packages/mountable/src/options.ts#L7
      const appController = stlite.mount({
          requirements: [STARTING_REQUIREMENTS], // Packages to install
          entrypoint: "streamlit_app.py", // The target file of the streamlit run command
          files: {
            ".streamlit/config.toml": streamlitConfig,
            "streamlit_app.py": code,
          },
        }, document.getElementById("root"));
      // Returned controller functions defined here:
      // https://github.com/whitphx/stlite/blob/1739c1cebb469a20e979906ce264f90254d154ba/packages/mountable/src/index.tsx#L55
      window.appController = appController;
    </script>
</body>
</html>