@gradio/code 0.5.12 → 0.6.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,47 @@
1
1
  # @gradio/code
2
2
 
3
+ ## 0.6.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/statustracker@0.5.0
42
+ - @gradio/upload@0.9.0
43
+ - @gradio/utils@0.4.0
44
+
3
45
  ## 0.5.12
4
46
 
5
47
  ### Dependency updates
package/Index.svelte CHANGED
@@ -23,6 +23,7 @@
23
23
  input: never;
24
24
  blur: never;
25
25
  focus: never;
26
+ clear_status: LoadingStatus;
26
27
  }>;
27
28
  export let value = "";
28
29
  export let value_is_output = false;
@@ -65,6 +66,7 @@
65
66
  autoscroll={gradio.autoscroll}
66
67
  i18n={gradio.i18n}
67
68
  {...loading_status}
69
+ on:clear_status={() => gradio.dispatch("clear_status", loading_status)}
68
70
  />
69
71
 
70
72
  <BlockLabel Icon={CodeIcon} {show_label} {label} float={false} />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gradio/code",
3
- "version": "0.5.12",
3
+ "version": "0.6.0",
4
4
  "description": "Gradio UI packages",
5
5
  "type": "module",
6
6
  "author": "",
@@ -27,12 +27,12 @@
27
27
  "cm6-theme-basic-dark": "^0.2.0",
28
28
  "cm6-theme-basic-light": "^0.2.0",
29
29
  "codemirror": "^6.0.1",
30
- "@gradio/atoms": "^0.7.0",
31
- "@gradio/statustracker": "^0.4.12",
32
- "@gradio/upload": "^0.8.5",
30
+ "@gradio/atoms": "^0.7.1",
31
+ "@gradio/statustracker": "^0.5.0",
33
32
  "@gradio/icons": "^0.4.0",
33
+ "@gradio/upload": "^0.9.0",
34
34
  "@gradio/wasm": "^0.10.0",
35
- "@gradio/utils": "^0.3.2"
35
+ "@gradio/utils": "^0.4.0"
36
36
  },
37
37
  "main_changeset": true,
38
38
  "main": "./Index.svelte",
@@ -40,5 +40,8 @@
40
40
  ".": "./Index.svelte",
41
41
  "./example": "./Example.svelte",
42
42
  "./package.json": "./package.json"
43
+ },
44
+ "devDependencies": {
45
+ "@gradio/preview": "^0.8.0"
43
46
  }
44
47
  }