@gradio/video 0.6.12 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,49 @@
1
1
  # @gradio/video
2
2
 
3
+ ## 0.7.0
4
+
5
+ ### Highlights
6
+
7
+ #### Setting File Upload Limits ([#7909](https://github.com/gradio-app/gradio/pull/7909) [`2afca65`](https://github.com/gradio-app/gradio/commit/2afca6541912b37dc84f447c7ad4af21607d7c72))
8
+
9
+ We have added a `max_file_size` size parameter to `launch()` that limits to size of files uploaded to the server. This limit applies to each individual file. This parameter can be specified as a string or an integer (corresponding to the size in bytes).
10
+
11
+ The following code snippet sets a max file size of 5 megabytes.
12
+
13
+ ```python
14
+ import gradio as gr
15
+
16
+ demo = gr.Interface(lambda x: x, "image", "image")
17
+
18
+ demo.launch(max_file_size="5mb")
19
+ # or
20
+ demo.launch(max_file_size=5 * gr.FileSize.MB)
21
+ ```
22
+
23
+ ![max_file_size_upload](https://github.com/gradio-app/gradio/assets/41651716/7547330c-a082-4901-a291-3f150a197e45)
24
+
25
+
26
+ #### Error states can now be cleared
27
+
28
+ When a component encounters an error, the error state shown in the UI can now be cleared by clicking on the `x` icon in the top right of the component. This applies to all types of errors, whether it's raised in the UI or the server.
29
+
30
+ ![error_modal_calculator](https://github.com/gradio-app/gradio/assets/41651716/16cb071c-accd-45a6-9c18-0dea27d4bd98)
31
+
32
+ Thanks @freddyaboulton!
33
+
34
+ ### Fixes
35
+
36
+ - [#8066](https://github.com/gradio-app/gradio/pull/8066) [`624f9b9`](https://github.com/gradio-app/gradio/commit/624f9b9477f74a581a6c14119234f9efdfcda398) - make gradio dev tools a local dependency rather than bundling. Thanks @pngwn!
37
+
38
+ ### Dependency updates
39
+
40
+ - @gradio/atoms@0.7.1
41
+ - @gradio/client@0.17.0
42
+ - @gradio/image@0.10.0
43
+ - @gradio/statustracker@0.5.0
44
+ - @gradio/upload@0.9.0
45
+ - @gradio/utils@0.4.0
46
+
3
47
  ## 0.6.12
4
48
 
5
49
  ### Dependency updates
package/Index.svelte CHANGED
@@ -48,6 +48,7 @@
48
48
  share: ShareData;
49
49
  error: string;
50
50
  warning: string;
51
+ clear_status: LoadingStatus;
51
52
  }>;
52
53
  export let interactive: boolean;
53
54
  export let mirror_webcam: boolean;
@@ -137,6 +138,7 @@
137
138
  autoscroll={gradio.autoscroll}
138
139
  i18n={gradio.i18n}
139
140
  {...loading_status}
141
+ on:clear_status={() => gradio.dispatch("clear_status", loading_status)}
140
142
  />
141
143
 
142
144
  <StaticVideo
@@ -175,6 +177,7 @@
175
177
  autoscroll={gradio.autoscroll}
176
178
  i18n={gradio.i18n}
177
179
  {...loading_status}
180
+ on:clear_status={() => gradio.dispatch("clear_status", loading_status)}
178
181
  />
179
182
 
180
183
  <Video
@@ -202,6 +205,7 @@
202
205
  on:start_recording={() => gradio.dispatch("start_recording")}
203
206
  on:stop_recording={() => gradio.dispatch("stop_recording")}
204
207
  i18n={gradio.i18n}
208
+ max_file_size={gradio.max_file_size}
205
209
  >
206
210
  <UploadText i18n={gradio.i18n} type="video" />
207
211
  </Video>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gradio/video",
3
- "version": "0.6.12",
3
+ "version": "0.7.0",
4
4
  "description": "Gradio UI packages",
5
5
  "type": "module",
6
6
  "author": "",
@@ -10,14 +10,17 @@
10
10
  "@ffmpeg/ffmpeg": "^0.12.7",
11
11
  "@ffmpeg/util": "^0.12.1",
12
12
  "mrmime": "^2.0.0",
13
- "@gradio/atoms": "^0.7.0",
14
- "@gradio/client": "^0.16.0",
13
+ "@gradio/client": "^0.17.0",
14
+ "@gradio/atoms": "^0.7.1",
15
15
  "@gradio/icons": "^0.4.0",
16
- "@gradio/statustracker": "^0.4.12",
17
- "@gradio/upload": "^0.8.5",
18
- "@gradio/utils": "^0.3.2",
19
- "@gradio/wasm": "^0.10.0",
20
- "@gradio/image": "^0.9.12"
16
+ "@gradio/image": "^0.10.0",
17
+ "@gradio/statustracker": "^0.5.0",
18
+ "@gradio/upload": "^0.9.0",
19
+ "@gradio/utils": "^0.4.0",
20
+ "@gradio/wasm": "^0.10.0"
21
+ },
22
+ "devDependencies": {
23
+ "@gradio/preview": "^0.8.0"
21
24
  },
22
25
  "exports": {
23
26
  ".": "./index.ts",
@@ -28,6 +28,7 @@
28
28
  export let i18n: I18nFormatter;
29
29
  export let active_source: "webcam" | "upload" = "webcam";
30
30
  export let handle_reset_value: () => void = () => {};
31
+ export let max_file_size: number | null = null;
31
32
 
32
33
  const dispatch = createEventDispatcher<{
33
34
  change: FileData | null;
@@ -77,6 +78,7 @@
77
78
  bind:dragging
78
79
  filetype="video/x-m4v,video/*"
79
80
  on:load={handle_load}
81
+ {max_file_size}
80
82
  on:error={({ detail }) => dispatch("error", detail)}
81
83
  {root}
82
84
  >