elismasilva commited on
Commit
d50fcf7
·
verified ·
1 Parent(s): 185559e

Upload folder using huggingface_hub

Browse files
README.md CHANGED
@@ -10,7 +10,7 @@ app_file: space.py
10
  ---
11
 
12
  # `gradio_propertysheet`
13
- <img alt="Static Badge" src="https://img.shields.io/badge/version%20-%200.0.16%20-%20blue"> <a href="https://huggingface.co/spaces/elismasilva/gradio_propertysheet"><img src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Demo-blue"></a><p><span>💻 <a href='https://github.com/DEVAIEXP/gradio_component_propertysheet'>Component GitHub Code</a></span></p>
14
 
15
  The **PropertySheet** component for Gradio allows you to automatically generate a complete and interactive settings panel from a standard Python `dataclass`. It's designed to bring the power of IDE-like property editors directly into your Gradio applications.
16
 
@@ -226,6 +226,7 @@ class SamplingSettings:
226
  "minimum": 0.0,
227
  "maximum": 1.0,
228
  "step": 0.01,
 
229
  "interactive_if": {"field": "enable_advanced", "value": True},
230
  "help": "An example of an advanced setting that is only visible when the corresponding checkbox is enabled."
231
  },
@@ -238,6 +239,7 @@ class SamplingSettings:
238
  "minimum": 0.1,
239
  "maximum": 2.0,
240
  "step": 0.1,
 
241
  "help": "Controls the randomness of the sampling process. A value of 1.0 is standard. Higher values increase diversity at the risk of artifacts."
242
  }
243
  )
 
10
  ---
11
 
12
  # `gradio_propertysheet`
13
+ <img alt="Static Badge" src="https://img.shields.io/badge/version%20-%200.0.17%20-%20blue"> <a href="https://huggingface.co/spaces/elismasilva/gradio_propertysheet"><img src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Demo-blue"></a><p><span>💻 <a href='https://github.com/DEVAIEXP/gradio_component_propertysheet'>Component GitHub Code</a></span></p>
14
 
15
  The **PropertySheet** component for Gradio allows you to automatically generate a complete and interactive settings panel from a standard Python `dataclass`. It's designed to bring the power of IDE-like property editors directly into your Gradio applications.
16
 
 
226
  "minimum": 0.0,
227
  "maximum": 1.0,
228
  "step": 0.01,
229
+ "visible_if": {"field": "enable_advanced", "value": True},
230
  "interactive_if": {"field": "enable_advanced", "value": True},
231
  "help": "An example of an advanced setting that is only visible when the corresponding checkbox is enabled."
232
  },
 
239
  "minimum": 0.1,
240
  "maximum": 2.0,
241
  "step": 0.1,
242
+ "visible_if": {"field": "enable_advanced", "value": True},
243
  "help": "Controls the randomness of the sampling process. A value of 1.0 is standard. Higher values increase diversity at the risk of artifacts."
244
  }
245
  )
space.py CHANGED
@@ -218,6 +218,7 @@ class SamplingSettings:
218
  "minimum": 0.0,
219
  "maximum": 1.0,
220
  "step": 0.01,
 
221
  "interactive_if": {"field": "enable_advanced", "value": True},
222
  "help": "An example of an advanced setting that is only visible when the corresponding checkbox is enabled."
223
  },
@@ -230,6 +231,7 @@ class SamplingSettings:
230
  "minimum": 0.1,
231
  "maximum": 2.0,
232
  "step": 0.1,
 
233
  "help": "Controls the randomness of the sampling process. A value of 1.0 is standard. Higher values increase diversity at the risk of artifacts."
234
  }
235
  )
 
218
  "minimum": 0.0,
219
  "maximum": 1.0,
220
  "step": 0.01,
221
+ "visible_if": {"field": "enable_advanced", "value": True},
222
  "interactive_if": {"field": "enable_advanced", "value": True},
223
  "help": "An example of an advanced setting that is only visible when the corresponding checkbox is enabled."
224
  },
 
231
  "minimum": 0.1,
232
  "maximum": 2.0,
233
  "step": 0.1,
234
+ "visible_if": {"field": "enable_advanced", "value": True},
235
  "help": "Controls the randomness of the sampling process. A value of 1.0 is standard. Higher values increase diversity at the risk of artifacts."
236
  }
237
  )
src/README.md CHANGED
@@ -10,7 +10,7 @@ app_file: space.py
10
  ---
11
 
12
  # `gradio_propertysheet`
13
- <img alt="Static Badge" src="https://img.shields.io/badge/version%20-%200.0.16%20-%20blue"> <a href="https://huggingface.co/spaces/elismasilva/gradio_propertysheet"><img src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Demo-blue"></a><p><span>💻 <a href='https://github.com/DEVAIEXP/gradio_component_propertysheet'>Component GitHub Code</a></span></p>
14
 
15
  The **PropertySheet** component for Gradio allows you to automatically generate a complete and interactive settings panel from a standard Python `dataclass`. It's designed to bring the power of IDE-like property editors directly into your Gradio applications.
16
 
@@ -226,6 +226,7 @@ class SamplingSettings:
226
  "minimum": 0.0,
227
  "maximum": 1.0,
228
  "step": 0.01,
 
229
  "interactive_if": {"field": "enable_advanced", "value": True},
230
  "help": "An example of an advanced setting that is only visible when the corresponding checkbox is enabled."
231
  },
@@ -238,6 +239,7 @@ class SamplingSettings:
238
  "minimum": 0.1,
239
  "maximum": 2.0,
240
  "step": 0.1,
 
241
  "help": "Controls the randomness of the sampling process. A value of 1.0 is standard. Higher values increase diversity at the risk of artifacts."
242
  }
243
  )
 
10
  ---
11
 
12
  # `gradio_propertysheet`
13
+ <img alt="Static Badge" src="https://img.shields.io/badge/version%20-%200.0.17%20-%20blue"> <a href="https://huggingface.co/spaces/elismasilva/gradio_propertysheet"><img src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Demo-blue"></a><p><span>💻 <a href='https://github.com/DEVAIEXP/gradio_component_propertysheet'>Component GitHub Code</a></span></p>
14
 
15
  The **PropertySheet** component for Gradio allows you to automatically generate a complete and interactive settings panel from a standard Python `dataclass`. It's designed to bring the power of IDE-like property editors directly into your Gradio applications.
16
 
 
226
  "minimum": 0.0,
227
  "maximum": 1.0,
228
  "step": 0.01,
229
+ "visible_if": {"field": "enable_advanced", "value": True},
230
  "interactive_if": {"field": "enable_advanced", "value": True},
231
  "help": "An example of an advanced setting that is only visible when the corresponding checkbox is enabled."
232
  },
 
239
  "minimum": 0.1,
240
  "maximum": 2.0,
241
  "step": 0.1,
242
+ "visible_if": {"field": "enable_advanced", "value": True},
243
  "help": "Controls the randomness of the sampling process. A value of 1.0 is standard. Higher values increase diversity at the risk of artifacts."
244
  }
245
  )
src/backend/gradio_propertysheet/propertysheet.py CHANGED
@@ -1,14 +1,12 @@
1
  from __future__ import annotations
2
  import copy
3
- import json
4
- import logging
5
  from typing import Any, Dict, List, get_type_hints
6
  import dataclasses
7
  from gradio.components.base import Component
8
  from gradio_propertysheet.helpers import extract_prop_metadata, infer_type
9
  from gradio_client.documentation import document
10
  from gradio.events import Events, EventListener
11
- logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - [BACKEND] %(message)s')
12
  def prop_meta(**kwargs) -> dataclasses.Field:
13
  """
14
  A helper function to create a dataclass field with Gradio-specific metadata.
 
1
  from __future__ import annotations
2
  import copy
 
 
3
  from typing import Any, Dict, List, get_type_hints
4
  import dataclasses
5
  from gradio.components.base import Component
6
  from gradio_propertysheet.helpers import extract_prop_metadata, infer_type
7
  from gradio_client.documentation import document
8
  from gradio.events import Events, EventListener
9
+
10
  def prop_meta(**kwargs) -> dataclasses.Field:
11
  """
12
  A helper function to create a dataclass field with Gradio-specific metadata.
src/demo/space.py CHANGED
@@ -218,6 +218,7 @@ class SamplingSettings:
218
  "minimum": 0.0,
219
  "maximum": 1.0,
220
  "step": 0.01,
 
221
  "interactive_if": {"field": "enable_advanced", "value": True},
222
  "help": "An example of an advanced setting that is only visible when the corresponding checkbox is enabled."
223
  },
@@ -230,6 +231,7 @@ class SamplingSettings:
230
  "minimum": 0.1,
231
  "maximum": 2.0,
232
  "step": 0.1,
 
233
  "help": "Controls the randomness of the sampling process. A value of 1.0 is standard. Higher values increase diversity at the risk of artifacts."
234
  }
235
  )
 
218
  "minimum": 0.0,
219
  "maximum": 1.0,
220
  "step": 0.01,
221
+ "visible_if": {"field": "enable_advanced", "value": True},
222
  "interactive_if": {"field": "enable_advanced", "value": True},
223
  "help": "An example of an advanced setting that is only visible when the corresponding checkbox is enabled."
224
  },
 
231
  "minimum": 0.1,
232
  "maximum": 2.0,
233
  "step": 0.1,
234
+ "visible_if": {"field": "enable_advanced", "value": True},
235
  "help": "Controls the randomness of the sampling process. A value of 1.0 is standard. Higher values increase diversity at the risk of artifacts."
236
  }
237
  )
src/pyproject.toml CHANGED
@@ -8,7 +8,7 @@ build-backend = "hatchling.build"
8
 
9
  [project]
10
  name = "gradio_propertysheet"
11
- version = "0.0.16"
12
  description = "Property sheet"
13
  readme = "README.md"
14
  license = "apache-2.0"
 
8
 
9
  [project]
10
  name = "gradio_propertysheet"
11
+ version = "0.0.17"
12
  description = "Property sheet"
13
  readme = "README.md"
14
  license = "apache-2.0"