multimodalart HF Staff commited on
Commit
b527adb
·
1 Parent(s): 7cf7ce2

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +7 -1
index.html CHANGED
@@ -1,7 +1,7 @@
1
  <input type="file" id="fileInput" multiple>
2
  <input type="text" id="repoInput" placeholder="Enter repo">
3
  <input type="password" id="accessTokenInput" placeholder="Enter access token">
4
- <button onClick="upload()">Upload</button>
5
 
6
  <script type="module">
7
  import { createRepo, uploadFiles } from "https://cdn.jsdelivr.net/npm/@huggingface/[email protected]/+esm";
@@ -32,4 +32,10 @@
32
  files: filesToUpload,
33
  });
34
  }
 
 
 
 
 
 
35
  </script>
 
1
  <input type="file" id="fileInput" multiple>
2
  <input type="text" id="repoInput" placeholder="Enter repo">
3
  <input type="password" id="accessTokenInput" placeholder="Enter access token">
4
+ <button id="uploadButton">Upload</button>
5
 
6
  <script type="module">
7
  import { createRepo, uploadFiles } from "https://cdn.jsdelivr.net/npm/@huggingface/[email protected]/+esm";
 
32
  files: filesToUpload,
33
  });
34
  }
35
+
36
+ // Attach the function to the window object
37
+ window.upload = upload;
38
+
39
+ // Attach the event listener to the button
40
+ document.getElementById('uploadButton').addEventListener('click', upload);
41
  </script>