gradio-pr-bot commited on
Commit
af0c2b5
·
verified ·
1 Parent(s): dcbfafa

Upload folder using huggingface_hub

Browse files
6.4.0/model3D/package.json CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  "name": "@gradio/model3d",
3
- "version": "0.16.1",
4
  "description": "Gradio UI packages",
5
  "type": "module",
6
  "author": "",
 
1
  {
2
  "name": "@gradio/model3d",
3
+ "version": "0.16.2",
4
  "description": "Gradio UI packages",
5
  "type": "module",
6
  "author": "",
6.4.0/model3D/shared/Model3DUpload.svelte CHANGED
@@ -86,9 +86,7 @@
86
  ondrag?.(dragging);
87
  });
88
 
89
- async function handle_upload({
90
- detail
91
- }: CustomEvent<FileData>): Promise<void> {
92
  value = detail;
93
  await tick();
94
  onchange?.(value);
@@ -106,8 +104,8 @@
106
  canvas3d?.reset_camera_position();
107
  }
108
 
109
- function handle_error({ detail }: CustomEvent<string>): void {
110
- onerror?.(detail);
111
  }
112
  </script>
113
 
@@ -118,13 +116,13 @@
118
  bind:upload_promise
119
  {upload}
120
  {stream_handler}
121
- on:load={handle_upload}
122
  {root}
123
  {max_file_size}
124
  filetype={[".stl", ".obj", ".gltf", ".glb", "model/obj", ".splat", ".ply"]}
125
  bind:dragging
126
  bind:uploading
127
- on:error={handle_error}
128
  aria_label={i18n("model3d.drop_to_upload")}
129
  >
130
  <slot />
@@ -133,9 +131,9 @@
133
  <div class="input-model">
134
  <ModifyUpload
135
  undoable={!use_3dgs}
136
- on:clear={handle_clear}
137
  {i18n}
138
- on:undo={handle_undo}
139
  />
140
 
141
  {#if use_3dgs}
 
86
  ondrag?.(dragging);
87
  });
88
 
89
+ async function handle_upload(detail: FileData): Promise<void> {
 
 
90
  value = detail;
91
  await tick();
92
  onchange?.(value);
 
104
  canvas3d?.reset_camera_position();
105
  }
106
 
107
+ function handle_error(error: string): void {
108
+ onerror?.(error);
109
  }
110
  </script>
111
 
 
116
  bind:upload_promise
117
  {upload}
118
  {stream_handler}
119
+ onload={handle_upload}
120
  {root}
121
  {max_file_size}
122
  filetype={[".stl", ".obj", ".gltf", ".glb", "model/obj", ".splat", ".ply"]}
123
  bind:dragging
124
  bind:uploading
125
+ onerror={handle_error}
126
  aria_label={i18n("model3d.drop_to_upload")}
127
  >
128
  <slot />
 
131
  <div class="input-model">
132
  <ModifyUpload
133
  undoable={!use_3dgs}
134
+ onclear={handle_clear}
135
  {i18n}
136
+ onundo={handle_undo}
137
  />
138
 
139
  {#if use_3dgs}