freddyaboulton HF staff commited on
Commit
3b99d6e
1 Parent(s): 8b00124

Upload folder using huggingface_hub

Browse files
README.md CHANGED
@@ -1,9 +1,9 @@
1
 
2
  ---
3
  tags: [gradio-custom-component,maps,geospatial,folium]
4
- title: gradio_folium V0.0.4
5
- colorFrom: indigo
6
- colorTo: gray
7
  sdk: docker
8
  pinned: false
9
  license: apache-2.0
 
1
 
2
  ---
3
  tags: [gradio-custom-component,maps,geospatial,folium]
4
+ title: gradio_folium V0.0.5
5
+ colorFrom: pink
6
+ colorTo: blue
7
  sdk: docker
8
  pinned: false
9
  license: apache-2.0
requirements.txt CHANGED
@@ -1 +1 @@
1
- gradio_folium-0.0.4-py3-none-any.whl
 
1
+ gradio_folium-0.0.5-py3-none-any.whl
src/backend/gradio_folium/folium.py CHANGED
@@ -20,17 +20,15 @@ class Folium(Component):
20
  elem_id: str | None = None,
21
  elem_classes: list[str] | str | None = None,
22
  render: bool = True,
23
- root_url: str | None = None,
24
- _skip_init_processing: bool = False,
25
  load_fn: Callable[..., Any] | None = None,
26
  every: float | None = None):
27
  super().__init__(value, label=label, info=None, show_label=True,
28
  container=container, scale=scale, min_width=min_width,
29
  visible=visible, elem_id=elem_id, elem_classes=elem_classes,
30
- render=render, root_url=root_url,
31
- _skip_init_processing=_skip_init_processing,
32
  load_fn=load_fn, every=every)
33
  self.height = height
 
34
  def preprocess(self, x):
35
  return x
36
 
@@ -39,7 +37,7 @@ class Folium(Component):
39
  return None
40
  with NamedTemporaryFile(suffix=".html", delete=False) as tmp:
41
  x.save(tmp.name)
42
- return FileData(name=tmp.name, is_file=True)
43
 
44
  def example_inputs(self):
45
  return {"info": "Do not use as input"}
 
20
  elem_id: str | None = None,
21
  elem_classes: list[str] | str | None = None,
22
  render: bool = True,
 
 
23
  load_fn: Callable[..., Any] | None = None,
24
  every: float | None = None):
25
  super().__init__(value, label=label, info=None, show_label=True,
26
  container=container, scale=scale, min_width=min_width,
27
  visible=visible, elem_id=elem_id, elem_classes=elem_classes,
28
+ render=render,
 
29
  load_fn=load_fn, every=every)
30
  self.height = height
31
+
32
  def preprocess(self, x):
33
  return x
34
 
 
37
  return None
38
  with NamedTemporaryFile(suffix=".html", delete=False) as tmp:
39
  x.save(tmp.name)
40
+ return FileData(path=tmp.name)
41
 
42
  def example_inputs(self):
43
  return {"info": "Do not use as input"}
src/backend/gradio_folium/folium.pyi CHANGED
@@ -16,17 +16,15 @@ class Folium(Component):
16
  elem_id: str | None = None,
17
  elem_classes: list[str] | str | None = None,
18
  render: bool = True,
19
- root_url: str | None = None,
20
- _skip_init_processing: bool = False,
21
  load_fn: Callable[..., Any] | None = None,
22
  every: float | None = None):
23
  super().__init__(value, label=label, info=None, show_label=True,
24
  container=container, scale=scale, min_width=min_width,
25
  visible=visible, elem_id=elem_id, elem_classes=elem_classes,
26
- render=render, root_url=root_url,
27
- _skip_init_processing=_skip_init_processing,
28
  load_fn=load_fn, every=every)
29
  self.height = height
 
30
  def preprocess(self, x):
31
  return x
32
 
@@ -35,7 +33,7 @@ class Folium(Component):
35
  return None
36
  with NamedTemporaryFile(suffix=".html", delete=False) as tmp:
37
  x.save(tmp.name)
38
- return FileData(name=tmp.name, is_file=True)
39
 
40
  def example_inputs(self):
41
  return {"info": "Do not use as input"}
 
16
  elem_id: str | None = None,
17
  elem_classes: list[str] | str | None = None,
18
  render: bool = True,
 
 
19
  load_fn: Callable[..., Any] | None = None,
20
  every: float | None = None):
21
  super().__init__(value, label=label, info=None, show_label=True,
22
  container=container, scale=scale, min_width=min_width,
23
  visible=visible, elem_id=elem_id, elem_classes=elem_classes,
24
+ render=render,
 
25
  load_fn=load_fn, every=every)
26
  self.height = height
27
+
28
  def preprocess(self, x):
29
  return x
30
 
 
33
  return None
34
  with NamedTemporaryFile(suffix=".html", delete=False) as tmp:
35
  x.save(tmp.name)
36
+ return FileData(path=tmp.name)
37
 
38
  def example_inputs(self):
39
  return {"info": "Do not use as input"}
src/backend/gradio_folium/templates/component/index.js CHANGED
The diff for this file is too large to render. See raw diff
 
src/backend/gradio_folium/templates/component/style.css CHANGED
@@ -1 +1 @@
1
- .block.svelte-1t38q2d{position:relative;margin:0;box-shadow:var(--block-shadow);border-width:var(--block-border-width);border-color:var(--block-border-color);border-radius:var(--block-radius);background:var(--block-background-fill);width:100%;line-height:var(--line-sm)}.block.border_focus.svelte-1t38q2d{border-color:var(--color-accent)}.padded.svelte-1t38q2d{padding:var(--block-padding)}.hidden.svelte-1t38q2d{display:none}.hide-container.svelte-1t38q2d{margin:0;box-shadow:none;--block-border-width:0;background:transparent;padding:0;overflow:visible}div.svelte-1hnfib2{margin-bottom:var(--spacing-lg);color:var(--block-info-text-color);font-weight:var(--block-info-text-weight);font-size:var(--block-info-text-size);line-height:var(--line-sm)}span.has-info.svelte-22c38v{margin-bottom:var(--spacing-xs)}span.svelte-22c38v:not(.has-info){margin-bottom:var(--spacing-lg)}span.svelte-22c38v{display:inline-block;position:relative;z-index:var(--layer-4);border:solid var(--block-title-border-width) var(--block-title-border-color);border-radius:var(--block-title-radius);background:var(--block-title-background-fill);padding:var(--block-title-padding);color:var(--block-title-text-color);font-weight:var(--block-title-text-weight);font-size:var(--block-title-text-size);line-height:var(--line-sm)}.hide.svelte-22c38v{margin:0;height:0}label.svelte-9gxdi0{display:inline-flex;align-items:center;z-index:var(--layer-2);box-shadow:var(--block-label-shadow);border:var(--block-label-border-width) solid var(--border-color-primary);border-top:none;border-left:none;border-radius:var(--block-label-radius);background:var(--block-label-background-fill);padding:var(--block-label-padding);pointer-events:none;color:var(--block-label-text-color);font-weight:var(--block-label-text-weight);font-size:var(--block-label-text-size);line-height:var(--line-sm)}.gr-group label.svelte-9gxdi0{border-top-left-radius:0}label.float.svelte-9gxdi0{position:absolute;top:var(--block-label-margin);left:var(--block-label-margin)}label.svelte-9gxdi0:not(.float){position:static;margin-top:var(--block-label-margin);margin-left:var(--block-label-margin)}.hide.svelte-9gxdi0{height:0}span.svelte-9gxdi0{opacity:.8;margin-right:var(--size-2);width:calc(var(--block-label-text-size) - 1px);height:calc(var(--block-label-text-size) - 1px)}.hide-label.svelte-9gxdi0{box-shadow:none;border-width:0;background:transparent;overflow:visible}button.svelte-lkmj4t{display:flex;justify-content:center;align-items:center;gap:1px;z-index:var(--layer-1);box-shadow:var(--shadow-drop);border:1px solid var(--button-secondary-border-color);border-radius:var(--radius-sm);background:var(--background-fill-primary);padding:2px;color:var(--block-label-text-color)}button.svelte-lkmj4t:hover{cursor:pointer;border:2px solid var(--button-secondary-border-color-hover);padding:1px;color:var(--block-label-text-color)}span.svelte-lkmj4t{padding:0 1px;font-size:10px}div.svelte-lkmj4t{padding:2px;width:14px;height:14px}.pending.svelte-lkmj4t{animation:svelte-lkmj4t-flash .5s infinite}@keyframes svelte-lkmj4t-flash{0%{opacity:.5}50%{opacity:1}to{opacity:.5}}.empty.svelte-3w3rth{display:flex;justify-content:center;align-items:center;margin-top:calc(0px - var(--size-6));height:var(--size-full)}.icon.svelte-3w3rth{opacity:.5;height:var(--size-5);color:var(--body-text-color)}.small.svelte-3w3rth{min-height:calc(var(--size-32) - 20px)}.large.svelte-3w3rth{min-height:calc(var(--size-64) - 20px)}.unpadded_box.svelte-3w3rth{margin-top:0}.small_parent.svelte-3w3rth{min-height:100%!important}.dropdown-arrow.svelte-1in5nh4{fill:var(--body-text-color);margin-right:var(--size-2);width:var(--size-5)}.wrap.svelte-8ytugg{display:flex;flex-direction:column;justify-content:center;min-height:var(--size-60);color:var(--block-label-text-color);line-height:var(--line-md)}.or.svelte-8ytugg{color:var(--body-text-color-subdued)}@media (--screen-md){.wrap.svelte-8ytugg{font-size:var(--text-lg)}}svg.svelte-43sxxs.svelte-43sxxs{width:var(--size-20);height:var(--size-20)}svg.svelte-43sxxs path.svelte-43sxxs{fill:var(--loader-color)}div.svelte-43sxxs.svelte-43sxxs{z-index:var(--layer-2)}.margin.svelte-43sxxs.svelte-43sxxs{margin:var(--size-4)}.wrap.svelte-14miwb5.svelte-14miwb5{display:flex;flex-direction:column;justify-content:center;align-items:center;z-index:var(--layer-5);transition:opacity .1s ease-in-out;border-radius:var(--block-radius);background:var(--block-background-fill);padding:0 var(--size-6);max-height:var(--size-screen-h);overflow:hidden;pointer-events:none}.wrap.center.svelte-14miwb5.svelte-14miwb5{top:0;right:0;left:0}.wrap.default.svelte-14miwb5.svelte-14miwb5{top:0;right:0;bottom:0;left:0}.hide.svelte-14miwb5.svelte-14miwb5{opacity:0;pointer-events:none}.generating.svelte-14miwb5.svelte-14miwb5{animation:svelte-14miwb5-pulse 2s cubic-bezier(.4,0,.6,1) infinite;border:2px solid var(--color-accent);background:transparent}.translucent.svelte-14miwb5.svelte-14miwb5{background:none}@keyframes svelte-14miwb5-pulse{0%,to{opacity:1}50%{opacity:.5}}.loading.svelte-14miwb5.svelte-14miwb5{z-index:var(--layer-2);color:var(--body-text-color)}.eta-bar.svelte-14miwb5.svelte-14miwb5{position:absolute;top:0;right:0;bottom:0;left:0;transform-origin:left;opacity:.8;z-index:var(--layer-1);transition:10ms;background:var(--background-fill-secondary)}.progress-bar-wrap.svelte-14miwb5.svelte-14miwb5{border:1px solid var(--border-color-primary);background:var(--background-fill-primary);width:55.5%;height:var(--size-4)}.progress-bar.svelte-14miwb5.svelte-14miwb5{transform-origin:left;background-color:var(--loader-color);width:var(--size-full);height:var(--size-full)}.progress-level.svelte-14miwb5.svelte-14miwb5{display:flex;flex-direction:column;align-items:center;gap:1;z-index:var(--layer-2);width:var(--size-full)}.progress-level-inner.svelte-14miwb5.svelte-14miwb5{margin:var(--size-2) auto;color:var(--body-text-color);font-size:var(--text-sm);font-family:var(--font-mono)}.meta-text.svelte-14miwb5.svelte-14miwb5{position:absolute;top:0;right:0;z-index:var(--layer-2);padding:var(--size-1) var(--size-2);font-size:var(--text-sm);font-family:var(--font-mono)}.meta-text-center.svelte-14miwb5.svelte-14miwb5{display:flex;position:absolute;top:0;right:0;justify-content:center;align-items:center;transform:translateY(var(--size-6));z-index:var(--layer-2);padding:var(--size-1) var(--size-2);font-size:var(--text-sm);font-family:var(--font-mono);text-align:center}.error.svelte-14miwb5.svelte-14miwb5{box-shadow:var(--shadow-drop);border:solid 1px var(--error-border-color);border-radius:var(--radius-full);background:var(--error-background-fill);padding-right:var(--size-4);padding-left:var(--size-4);color:var(--error-text-color);font-weight:var(--weight-semibold);font-size:var(--text-lg);line-height:var(--line-lg);font-family:var(--font)}.minimal.svelte-14miwb5 .progress-text.svelte-14miwb5{background:var(--block-background-fill)}.border.svelte-14miwb5.svelte-14miwb5{border:1px solid var(--border-color-primary)}.toast-body.svelte-solcu7{display:flex;position:relative;right:0;left:0;align-items:center;margin:var(--size-6) var(--size-4);margin:auto;border-radius:var(--container-radius);overflow:hidden;pointer-events:auto}.toast-body.error.svelte-solcu7{border:1px solid var(--color-red-700);background:var(--color-red-50)}.dark .toast-body.error.svelte-solcu7{border:1px solid var(--color-red-500);background-color:var(--color-grey-950)}.toast-body.warning.svelte-solcu7{border:1px solid var(--color-yellow-700);background:var(--color-yellow-50)}.dark .toast-body.warning.svelte-solcu7{border:1px solid var(--color-yellow-500);background-color:var(--color-grey-950)}.toast-body.info.svelte-solcu7{border:1px solid var(--color-grey-700);background:var(--color-grey-50)}.dark .toast-body.info.svelte-solcu7{border:1px solid var(--color-grey-500);background-color:var(--color-grey-950)}.toast-title.svelte-solcu7{display:flex;align-items:center;font-weight:var(--weight-bold);font-size:var(--text-lg);line-height:var(--line-sm);text-transform:capitalize}.toast-title.error.svelte-solcu7{color:var(--color-red-700)}.dark .toast-title.error.svelte-solcu7{color:var(--color-red-50)}.toast-title.warning.svelte-solcu7{color:var(--color-yellow-700)}.dark .toast-title.warning.svelte-solcu7{color:var(--color-yellow-50)}.toast-title.info.svelte-solcu7{color:var(--color-grey-700)}.dark .toast-title.info.svelte-solcu7{color:var(--color-grey-50)}.toast-close.svelte-solcu7{margin:0 var(--size-3);border-radius:var(--size-3);padding:0px var(--size-1-5);font-size:var(--size-5);line-height:var(--size-5)}.toast-close.error.svelte-solcu7{color:var(--color-red-700)}.dark .toast-close.error.svelte-solcu7{color:var(--color-red-500)}.toast-close.warning.svelte-solcu7{color:var(--color-yellow-700)}.dark .toast-close.warning.svelte-solcu7{color:var(--color-yellow-500)}.toast-close.info.svelte-solcu7{color:var(--color-grey-700)}.dark .toast-close.info.svelte-solcu7{color:var(--color-grey-500)}.toast-text.svelte-solcu7{font-size:var(--text-lg)}.toast-text.error.svelte-solcu7{color:var(--color-red-700)}.dark .toast-text.error.svelte-solcu7{color:var(--color-red-50)}.toast-text.warning.svelte-solcu7{color:var(--color-yellow-700)}.dark .toast-text.warning.svelte-solcu7{color:var(--color-yellow-50)}.toast-text.info.svelte-solcu7{color:var(--color-grey-700)}.dark .toast-text.info.svelte-solcu7{color:var(--color-grey-50)}.toast-details.svelte-solcu7{margin:var(--size-3) var(--size-3) var(--size-3) 0;width:100%}.toast-icon.svelte-solcu7{display:flex;position:absolute;position:relative;flex-shrink:0;justify-content:center;align-items:center;margin:var(--size-2);border-radius:var(--radius-full);padding:var(--size-1);padding-left:calc(var(--size-1) - 1px);width:35px;height:35px}.toast-icon.error.svelte-solcu7{color:var(--color-red-700)}.dark .toast-icon.error.svelte-solcu7{color:var(--color-red-500)}.toast-icon.warning.svelte-solcu7{color:var(--color-yellow-700)}.dark .toast-icon.warning.svelte-solcu7{color:var(--color-yellow-500)}.toast-icon.info.svelte-solcu7{color:var(--color-grey-700)}.dark .toast-icon.info.svelte-solcu7{color:var(--color-grey-500)}@keyframes svelte-solcu7-countdown{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.timer.svelte-solcu7{position:absolute;bottom:0;left:0;transform-origin:0 0;animation:svelte-solcu7-countdown 10s linear forwards;width:100%;height:var(--size-1)}.timer.error.svelte-solcu7{background:var(--color-red-700)}.dark .timer.error.svelte-solcu7{background:var(--color-red-500)}.timer.warning.svelte-solcu7{background:var(--color-yellow-700)}.dark .timer.warning.svelte-solcu7{background:var(--color-yellow-500)}.timer.info.svelte-solcu7{background:var(--color-grey-700)}.dark .timer.info.svelte-solcu7{background:var(--color-grey-500)}.toast-wrap.svelte-gatr8h{display:flex;position:fixed;top:var(--size-4);right:var(--size-4);flex-direction:column;align-items:end;gap:var(--size-2);z-index:var(--layer-top);width:calc(100% - var(--size-8))}@media (--screen-sm){.toast-wrap.svelte-gatr8h{width:calc(var(--size-96) + var(--size-10))}}button.svelte-2w9i1r{cursor:pointer;width:var(--size-full);height:var(--size-full)}.center.svelte-2w9i1r{display:flex;justify-content:center}.flex.svelte-2w9i1r{display:flex;justify-content:center;align-items:center}input.svelte-2w9i1r{display:none}div.svelte-1wj0ocy{display:flex;top:var(--size-2);right:var(--size-2);justify-content:flex-end;gap:var(--spacing-sm);z-index:var(--layer-1)}.not-absolute.svelte-1wj0ocy{margin:var(--size-1)}iframe.svelte-1orump4{display:flex;width:var(--size-full)}
 
1
+ .block.svelte-1t38q2d{position:relative;margin:0;box-shadow:var(--block-shadow);border-width:var(--block-border-width);border-color:var(--block-border-color);border-radius:var(--block-radius);background:var(--block-background-fill);width:100%;line-height:var(--line-sm)}.block.border_focus.svelte-1t38q2d{border-color:var(--color-accent)}.padded.svelte-1t38q2d{padding:var(--block-padding)}.hidden.svelte-1t38q2d{display:none}.hide-container.svelte-1t38q2d{margin:0;box-shadow:none;--block-border-width:0;background:transparent;padding:0;overflow:visible}div.svelte-1hnfib2{margin-bottom:var(--spacing-lg);color:var(--block-info-text-color);font-weight:var(--block-info-text-weight);font-size:var(--block-info-text-size);line-height:var(--line-sm)}span.has-info.svelte-22c38v{margin-bottom:var(--spacing-xs)}span.svelte-22c38v:not(.has-info){margin-bottom:var(--spacing-lg)}span.svelte-22c38v{display:inline-block;position:relative;z-index:var(--layer-4);border:solid var(--block-title-border-width) var(--block-title-border-color);border-radius:var(--block-title-radius);background:var(--block-title-background-fill);padding:var(--block-title-padding);color:var(--block-title-text-color);font-weight:var(--block-title-text-weight);font-size:var(--block-title-text-size);line-height:var(--line-sm)}.hide.svelte-22c38v{margin:0;height:0}label.svelte-9gxdi0{display:inline-flex;align-items:center;z-index:var(--layer-2);box-shadow:var(--block-label-shadow);border:var(--block-label-border-width) solid var(--border-color-primary);border-top:none;border-left:none;border-radius:var(--block-label-radius);background:var(--block-label-background-fill);padding:var(--block-label-padding);pointer-events:none;color:var(--block-label-text-color);font-weight:var(--block-label-text-weight);font-size:var(--block-label-text-size);line-height:var(--line-sm)}.gr-group label.svelte-9gxdi0{border-top-left-radius:0}label.float.svelte-9gxdi0{position:absolute;top:var(--block-label-margin);left:var(--block-label-margin)}label.svelte-9gxdi0:not(.float){position:static;margin-top:var(--block-label-margin);margin-left:var(--block-label-margin)}.hide.svelte-9gxdi0{height:0}span.svelte-9gxdi0{opacity:.8;margin-right:var(--size-2);width:calc(var(--block-label-text-size) - 1px);height:calc(var(--block-label-text-size) - 1px)}.hide-label.svelte-9gxdi0{box-shadow:none;border-width:0;background:transparent;overflow:visible}button.svelte-xtz2g8{display:flex;justify-content:center;align-items:center;gap:1px;z-index:var(--layer-2);border-radius:var(--radius-sm);color:var(--block-label-text-color);border:1px solid transparent}.padded.svelte-xtz2g8{padding:2px;background:var(--background-fill-primary);box-shadow:var(--shadow-drop);border:1px solid var(--button-secondary-border-color)}button.svelte-xtz2g8:hover{cursor:pointer;color:var(--color-accent)}.padded.svelte-xtz2g8:hover{border:2px solid var(--button-secondary-border-color-hover);padding:1px;color:var(--block-label-text-color)}span.svelte-xtz2g8{padding:0 1px;font-size:10px}div.svelte-xtz2g8{padding:2px;display:flex;align-items:flex-end}.small.svelte-xtz2g8{width:14px;height:14px}.large.svelte-xtz2g8{width:22px;height:22px}.pending.svelte-xtz2g8{animation:svelte-xtz2g8-flash .5s infinite}@keyframes svelte-xtz2g8-flash{0%{opacity:.5}50%{opacity:1}to{opacity:.5}}.empty.svelte-3w3rth{display:flex;justify-content:center;align-items:center;margin-top:calc(0px - var(--size-6));height:var(--size-full)}.icon.svelte-3w3rth{opacity:.5;height:var(--size-5);color:var(--body-text-color)}.small.svelte-3w3rth{min-height:calc(var(--size-32) - 20px)}.large.svelte-3w3rth{min-height:calc(var(--size-64) - 20px)}.unpadded_box.svelte-3w3rth{margin-top:0}.small_parent.svelte-3w3rth{min-height:100%!important}.dropdown-arrow.svelte-145leq6{fill:currentColor}.wrap.svelte-kzcjhc{display:flex;flex-direction:column;justify-content:center;align-items:center;min-height:var(--size-60);color:var(--block-label-text-color);line-height:var(--line-md);height:100%;padding-top:var(--size-3)}.or.svelte-kzcjhc{color:var(--body-text-color-subdued);display:flex}.icon-wrap.svelte-kzcjhc{width:30px;margin-bottom:var(--spacing-lg)}@media (--screen-md){.wrap.svelte-kzcjhc{font-size:var(--text-lg)}}.hovered.svelte-kzcjhc{color:var(--color-accent)}div.svelte-1nba87b{border-top:1px solid transparent;display:flex;max-height:100%;justify-content:center;gap:var(--spacing-sm);height:auto;align-items:flex-end;box-shadow:var(--shadow-drop);padding:var(--spacing-xl) 0;color:var(--block-label-text-color);flex-shrink:0;width:95%}.show_border.svelte-1nba87b{border-top:1px solid var(--block-border-color);margin-top:var(--spacing-xxl)}.source-selection.svelte-lde7lt{display:flex;align-items:center;justify-content:center;border-top:1px solid var(--border-color-primary);width:95%;bottom:0;left:0;right:0;margin-left:auto;margin-right:auto;align-self:flex-end}.icon.svelte-lde7lt{width:22px;height:22px;margin:var(--spacing-lg) var(--spacing-xs);padding:var(--spacing-xs);color:var(--neutral-400);border-radius:var(--radius-md)}.selected.svelte-lde7lt{color:var(--color-accent)}.icon.svelte-lde7lt:hover,.icon.svelte-lde7lt:focus{color:var(--color-accent)}svg.svelte-43sxxs.svelte-43sxxs{width:var(--size-20);height:var(--size-20)}svg.svelte-43sxxs path.svelte-43sxxs{fill:var(--loader-color)}div.svelte-43sxxs.svelte-43sxxs{z-index:var(--layer-2)}.margin.svelte-43sxxs.svelte-43sxxs{margin:var(--size-4)}.wrap.svelte-14miwb5.svelte-14miwb5{display:flex;flex-direction:column;justify-content:center;align-items:center;z-index:var(--layer-5);transition:opacity .1s ease-in-out;border-radius:var(--block-radius);background:var(--block-background-fill);padding:0 var(--size-6);max-height:var(--size-screen-h);overflow:hidden;pointer-events:none}.wrap.center.svelte-14miwb5.svelte-14miwb5{top:0;right:0;left:0}.wrap.default.svelte-14miwb5.svelte-14miwb5{top:0;right:0;bottom:0;left:0}.hide.svelte-14miwb5.svelte-14miwb5{opacity:0;pointer-events:none}.generating.svelte-14miwb5.svelte-14miwb5{animation:svelte-14miwb5-pulse 2s cubic-bezier(.4,0,.6,1) infinite;border:2px solid var(--color-accent);background:transparent}.translucent.svelte-14miwb5.svelte-14miwb5{background:none}@keyframes svelte-14miwb5-pulse{0%,to{opacity:1}50%{opacity:.5}}.loading.svelte-14miwb5.svelte-14miwb5{z-index:var(--layer-2);color:var(--body-text-color)}.eta-bar.svelte-14miwb5.svelte-14miwb5{position:absolute;top:0;right:0;bottom:0;left:0;transform-origin:left;opacity:.8;z-index:var(--layer-1);transition:10ms;background:var(--background-fill-secondary)}.progress-bar-wrap.svelte-14miwb5.svelte-14miwb5{border:1px solid var(--border-color-primary);background:var(--background-fill-primary);width:55.5%;height:var(--size-4)}.progress-bar.svelte-14miwb5.svelte-14miwb5{transform-origin:left;background-color:var(--loader-color);width:var(--size-full);height:var(--size-full)}.progress-level.svelte-14miwb5.svelte-14miwb5{display:flex;flex-direction:column;align-items:center;gap:1;z-index:var(--layer-2);width:var(--size-full)}.progress-level-inner.svelte-14miwb5.svelte-14miwb5{margin:var(--size-2) auto;color:var(--body-text-color);font-size:var(--text-sm);font-family:var(--font-mono)}.meta-text.svelte-14miwb5.svelte-14miwb5{position:absolute;top:0;right:0;z-index:var(--layer-2);padding:var(--size-1) var(--size-2);font-size:var(--text-sm);font-family:var(--font-mono)}.meta-text-center.svelte-14miwb5.svelte-14miwb5{display:flex;position:absolute;top:0;right:0;justify-content:center;align-items:center;transform:translateY(var(--size-6));z-index:var(--layer-2);padding:var(--size-1) var(--size-2);font-size:var(--text-sm);font-family:var(--font-mono);text-align:center}.error.svelte-14miwb5.svelte-14miwb5{box-shadow:var(--shadow-drop);border:solid 1px var(--error-border-color);border-radius:var(--radius-full);background:var(--error-background-fill);padding-right:var(--size-4);padding-left:var(--size-4);color:var(--error-text-color);font-weight:var(--weight-semibold);font-size:var(--text-lg);line-height:var(--line-lg);font-family:var(--font)}.minimal.svelte-14miwb5 .progress-text.svelte-14miwb5{background:var(--block-background-fill)}.border.svelte-14miwb5.svelte-14miwb5{border:1px solid var(--border-color-primary)}.toast-body.svelte-solcu7{display:flex;position:relative;right:0;left:0;align-items:center;margin:var(--size-6) var(--size-4);margin:auto;border-radius:var(--container-radius);overflow:hidden;pointer-events:auto}.toast-body.error.svelte-solcu7{border:1px solid var(--color-red-700);background:var(--color-red-50)}.dark .toast-body.error.svelte-solcu7{border:1px solid var(--color-red-500);background-color:var(--color-grey-950)}.toast-body.warning.svelte-solcu7{border:1px solid var(--color-yellow-700);background:var(--color-yellow-50)}.dark .toast-body.warning.svelte-solcu7{border:1px solid var(--color-yellow-500);background-color:var(--color-grey-950)}.toast-body.info.svelte-solcu7{border:1px solid var(--color-grey-700);background:var(--color-grey-50)}.dark .toast-body.info.svelte-solcu7{border:1px solid var(--color-grey-500);background-color:var(--color-grey-950)}.toast-title.svelte-solcu7{display:flex;align-items:center;font-weight:var(--weight-bold);font-size:var(--text-lg);line-height:var(--line-sm);text-transform:capitalize}.toast-title.error.svelte-solcu7{color:var(--color-red-700)}.dark .toast-title.error.svelte-solcu7{color:var(--color-red-50)}.toast-title.warning.svelte-solcu7{color:var(--color-yellow-700)}.dark .toast-title.warning.svelte-solcu7{color:var(--color-yellow-50)}.toast-title.info.svelte-solcu7{color:var(--color-grey-700)}.dark .toast-title.info.svelte-solcu7{color:var(--color-grey-50)}.toast-close.svelte-solcu7{margin:0 var(--size-3);border-radius:var(--size-3);padding:0px var(--size-1-5);font-size:var(--size-5);line-height:var(--size-5)}.toast-close.error.svelte-solcu7{color:var(--color-red-700)}.dark .toast-close.error.svelte-solcu7{color:var(--color-red-500)}.toast-close.warning.svelte-solcu7{color:var(--color-yellow-700)}.dark .toast-close.warning.svelte-solcu7{color:var(--color-yellow-500)}.toast-close.info.svelte-solcu7{color:var(--color-grey-700)}.dark .toast-close.info.svelte-solcu7{color:var(--color-grey-500)}.toast-text.svelte-solcu7{font-size:var(--text-lg)}.toast-text.error.svelte-solcu7{color:var(--color-red-700)}.dark .toast-text.error.svelte-solcu7{color:var(--color-red-50)}.toast-text.warning.svelte-solcu7{color:var(--color-yellow-700)}.dark .toast-text.warning.svelte-solcu7{color:var(--color-yellow-50)}.toast-text.info.svelte-solcu7{color:var(--color-grey-700)}.dark .toast-text.info.svelte-solcu7{color:var(--color-grey-50)}.toast-details.svelte-solcu7{margin:var(--size-3) var(--size-3) var(--size-3) 0;width:100%}.toast-icon.svelte-solcu7{display:flex;position:absolute;position:relative;flex-shrink:0;justify-content:center;align-items:center;margin:var(--size-2);border-radius:var(--radius-full);padding:var(--size-1);padding-left:calc(var(--size-1) - 1px);width:35px;height:35px}.toast-icon.error.svelte-solcu7{color:var(--color-red-700)}.dark .toast-icon.error.svelte-solcu7{color:var(--color-red-500)}.toast-icon.warning.svelte-solcu7{color:var(--color-yellow-700)}.dark .toast-icon.warning.svelte-solcu7{color:var(--color-yellow-500)}.toast-icon.info.svelte-solcu7{color:var(--color-grey-700)}.dark .toast-icon.info.svelte-solcu7{color:var(--color-grey-500)}@keyframes svelte-solcu7-countdown{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.timer.svelte-solcu7{position:absolute;bottom:0;left:0;transform-origin:0 0;animation:svelte-solcu7-countdown 10s linear forwards;width:100%;height:var(--size-1)}.timer.error.svelte-solcu7{background:var(--color-red-700)}.dark .timer.error.svelte-solcu7{background:var(--color-red-500)}.timer.warning.svelte-solcu7{background:var(--color-yellow-700)}.dark .timer.warning.svelte-solcu7{background:var(--color-yellow-500)}.timer.info.svelte-solcu7{background:var(--color-grey-700)}.dark .timer.info.svelte-solcu7{background:var(--color-grey-500)}.toast-wrap.svelte-gatr8h{display:flex;position:fixed;top:var(--size-4);right:var(--size-4);flex-direction:column;align-items:end;gap:var(--size-2);z-index:var(--layer-top);width:calc(100% - var(--size-8))}@media (--screen-sm){.toast-wrap.svelte-gatr8h{width:calc(var(--size-96) + var(--size-10))}}iframe.svelte-1orump4{display:flex;width:var(--size-full)}
src/frontend/Index.svelte CHANGED
@@ -2,8 +2,8 @@
2
  import type { Gradio } from "@gradio/utils";
3
  import { Block, BlockLabel } from "@gradio/atoms";
4
  import { StatusTracker } from "@gradio/statustracker";
5
- import {normalise_file} from "@gradio/upload";
6
- import type {FileData} from "@gradio/upload";
7
  import type { LoadingStatus } from "@gradio/statustracker";
8
  import { Empty } from "@gradio/atoms";
9
  import { Plot as PlotIcon } from "@gradio/icons";
@@ -48,7 +48,7 @@
48
  {/if}
49
  <BlockLabel show_label={true} Icon={PlotIcon} label={label || "Folium Map"} />
50
  {#if value}
51
- <iframe src={new_value.data} title={label ?? "Folium Map"} height="{height}px"></iframe>
52
  {:else}
53
  <Empty unpadded_box={true} size="large"><PlotIcon /></Empty>
54
  {/if}
 
2
  import type { Gradio } from "@gradio/utils";
3
  import { Block, BlockLabel } from "@gradio/atoms";
4
  import { StatusTracker } from "@gradio/statustracker";
5
+ import { normalise_file } from "@gradio/client";
6
+ import type { FileData } from "@gradio/client";
7
  import type { LoadingStatus } from "@gradio/statustracker";
8
  import { Empty } from "@gradio/atoms";
9
  import { Plot as PlotIcon } from "@gradio/icons";
 
48
  {/if}
49
  <BlockLabel show_label={true} Icon={PlotIcon} label={label || "Folium Map"} />
50
  {#if value}
51
+ <iframe src={new_value.url} title={label ?? "Folium Map"} height="{height}px"></iframe>
52
  {:else}
53
  <Empty unpadded_box={true} size="large"><PlotIcon /></Empty>
54
  {/if}
src/frontend/package-lock.json CHANGED
@@ -9,10 +9,10 @@
9
  "version": "0.2.0-beta.6",
10
  "license": "ISC",
11
  "dependencies": {
12
- "@gradio/atoms": "0.2.0-beta.4",
13
- "@gradio/statustracker": "0.3.0-beta.6",
14
- "@gradio/upload": "0.3.0-beta.4",
15
- "@gradio/utils": "0.2.0-beta.4",
16
  "@zerodevx/svelte-json-view": "^1.0.7"
17
  }
18
  },
@@ -404,18 +404,27 @@
404
  }
405
  },
406
  "node_modules/@gradio/atoms": {
407
- "version": "0.2.0-beta.4",
408
- "resolved": "https://registry.npmjs.org/@gradio/atoms/-/atoms-0.2.0-beta.4.tgz",
409
- "integrity": "sha512-xZfP9oPmb7iiuGl7KB4vVELSVk9f3w5Y9KRIxkAaMb+oeRpmb5uDtKQPAxntpm0W9rKAZmYG+DIWhInlu1eeKA==",
 
 
 
 
 
 
 
 
 
410
  "dependencies": {
411
- "@gradio/icons": "^0.2.0-beta.1",
412
- "@gradio/utils": "^0.2.0-beta.4"
413
  }
414
  },
415
  "node_modules/@gradio/client": {
416
- "version": "0.5.2",
417
- "resolved": "https://registry.npmjs.org/@gradio/client/-/client-0.5.2.tgz",
418
- "integrity": "sha512-aQk3FEJt3R/7d7Xul0KqSUDqh0rwgQQwTXBuLS5qHuf861ym7bJcm/kDqqBgyu3/9pxAsybSdgA/G0QyZSBKgA==",
419
  "dependencies": {
420
  "bufferutil": "^4.0.7",
421
  "semiver": "^1.1.0",
@@ -426,43 +435,40 @@
426
  }
427
  },
428
  "node_modules/@gradio/column": {
429
- "version": "0.1.0-beta.2",
430
- "resolved": "https://registry.npmjs.org/@gradio/column/-/column-0.1.0-beta.2.tgz",
431
- "integrity": "sha512-vL0GECdNL4wAaO/o0JcF3fm2xyMrx5DJWXUiPq/sUwqZwwB95srPGKBVTmVja3HproVXCBEnTzPQmRlrwWK67w=="
432
  },
433
  "node_modules/@gradio/icons": {
434
- "version": "0.2.0-beta.1",
435
- "resolved": "https://registry.npmjs.org/@gradio/icons/-/icons-0.2.0-beta.1.tgz",
436
- "integrity": "sha512-6nwP1NIi0u4YQoSoaqC/rY0wuCvJHsnK+8aHDOE37070JpzBGuxB/VUlEgO7trNz5zI/EJy2htIRYsqz1vKmXA=="
437
  },
438
  "node_modules/@gradio/statustracker": {
439
- "version": "0.3.0-beta.6",
440
- "resolved": "https://registry.npmjs.org/@gradio/statustracker/-/statustracker-0.3.0-beta.6.tgz",
441
- "integrity": "sha512-AIhaMCnr2uibHdqRrs4K8ZUvZK0q5e430TcvoduLOkaoOrkfnqetrHaHdOLNBz+H4kJlXJRsmt7ZZYV4wwMXRQ==",
442
  "dependencies": {
443
- "@gradio/atoms": "^0.2.0-beta.4",
444
- "@gradio/column": "^0.1.0-beta.2",
445
- "@gradio/icons": "^0.2.0-beta.1",
446
- "@gradio/utils": "^0.2.0-beta.4"
447
  }
448
  },
449
- "node_modules/@gradio/theme": {
450
- "version": "0.2.0-beta.2",
451
- "resolved": "https://registry.npmjs.org/@gradio/theme/-/theme-0.2.0-beta.2.tgz",
452
- "integrity": "sha512-yKrA8eE02URtXUC9w98lBW8tqZk5oGumbBH7bFKOAhsrv1sbVZKir18P4a2/EL4XJ6Um36MwhPB3D5ipMniV5g=="
453
- },
454
- "node_modules/@gradio/upload": {
455
- "version": "0.3.0-beta.4",
456
- "resolved": "https://registry.npmjs.org/@gradio/upload/-/upload-0.3.0-beta.4.tgz",
457
- "integrity": "sha512-JFajJHKJCAjZjtXDRZvLifGOs/b38fAuzAMshkDUQaJloRYk4KKpjnyj8d68wkQFzq3SK8ChKwfYoeMX8zp3yA==",
458
  "dependencies": {
459
- "@gradio/atoms": "^0.2.0-beta.4",
460
- "@gradio/client": "^0.5.2",
461
- "@gradio/icons": "^0.2.0-beta.1",
462
- "@gradio/upload": "^0.3.0-beta.4",
463
- "@gradio/utils": "^0.2.0-beta.4"
464
  }
465
  },
 
 
 
 
 
466
  "node_modules/@gradio/utils": {
467
  "version": "0.2.0-beta.4",
468
  "resolved": "https://registry.npmjs.org/@gradio/utils/-/utils-0.2.0-beta.4.tgz",
@@ -850,9 +856,9 @@
850
  "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ=="
851
  },
852
  "node_modules/node-gyp-build": {
853
- "version": "4.6.1",
854
- "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.1.tgz",
855
- "integrity": "sha512-24vnklJmyRS8ViBNI8KbtK/r/DmXQMRiOMXTNz2nrTnAYUwjmEEbnnpB/+kt+yWRv73bPsSPRFddrcIbAxSiMQ==",
856
  "bin": {
857
  "node-gyp-build": "bin.js",
858
  "node-gyp-build-optional": "optional.js",
 
9
  "version": "0.2.0-beta.6",
10
  "license": "ISC",
11
  "dependencies": {
12
+ "@gradio/atoms": "^0.2.2",
13
+ "@gradio/client": "^0.8.1",
14
+ "@gradio/statustracker": "^0.3.2",
15
+ "@gradio/utils": "^0.2.0-beta.4",
16
  "@zerodevx/svelte-json-view": "^1.0.7"
17
  }
18
  },
 
404
  }
405
  },
406
  "node_modules/@gradio/atoms": {
407
+ "version": "0.2.2",
408
+ "resolved": "https://registry.npmjs.org/@gradio/atoms/-/atoms-0.2.2.tgz",
409
+ "integrity": "sha512-tyBd1MTXGGyDFUyKSWW5L9ZpyxsORbeDB2lgDN149b+nAv5BmOSoKDMyJ11pbQJEZDRzYVLHDfkKUd9FAHA0nQ==",
410
+ "dependencies": {
411
+ "@gradio/icons": "^0.2.1",
412
+ "@gradio/utils": "^0.2.0"
413
+ }
414
+ },
415
+ "node_modules/@gradio/atoms/node_modules/@gradio/utils": {
416
+ "version": "0.2.0",
417
+ "resolved": "https://registry.npmjs.org/@gradio/utils/-/utils-0.2.0.tgz",
418
+ "integrity": "sha512-YkwzXufi6IxQrlMW+1sFo8Yn6F9NLL69ZoBsbo7QEhms0v5L7pmOTw+dfd7M3dwbRP2lgjrb52i1kAIN3n6aqQ==",
419
  "dependencies": {
420
+ "@gradio/theme": "^0.2.0",
421
+ "svelte-i18n": "^3.6.0"
422
  }
423
  },
424
  "node_modules/@gradio/client": {
425
+ "version": "0.8.1",
426
+ "resolved": "https://registry.npmjs.org/@gradio/client/-/client-0.8.1.tgz",
427
+ "integrity": "sha512-qMFINw6MbubLYQiLorwGhyapH7bUSthH+7tevGgKOPuQWoW5TliPi95VEFRUQ+d2Y/vXqWj0+hubO94RO7v/7w==",
428
  "dependencies": {
429
  "bufferutil": "^4.0.7",
430
  "semiver": "^1.1.0",
 
435
  }
436
  },
437
  "node_modules/@gradio/column": {
438
+ "version": "0.1.0",
439
+ "resolved": "https://registry.npmjs.org/@gradio/column/-/column-0.1.0.tgz",
440
+ "integrity": "sha512-P24nqqVnMXBaDA1f/zSN5HZRho4PxP8Dq+7VltPHlmxIEiZYik2AJ4J0LeuIha34FDO0guu/16evdrpvGIUAfw=="
441
  },
442
  "node_modules/@gradio/icons": {
443
+ "version": "0.2.1",
444
+ "resolved": "https://registry.npmjs.org/@gradio/icons/-/icons-0.2.1.tgz",
445
+ "integrity": "sha512-qJ0mP14UZzU9lwCU+dfiHZJsOktFD1/x6VxS3BZNX7HG93M5EO3kpc6hQLy5ZMVgUmKIPKASKkaFJQYi53UJ3Q=="
446
  },
447
  "node_modules/@gradio/statustracker": {
448
+ "version": "0.3.2",
449
+ "resolved": "https://registry.npmjs.org/@gradio/statustracker/-/statustracker-0.3.2.tgz",
450
+ "integrity": "sha512-eb7GPGvSZ1VWIzhsGFyi1LGk8aLbafXu7QszTVebn4GE5l7VvdLWzBAqQGXA8CFJsF5y03z9Ky1vwzNkWKKX5w==",
451
  "dependencies": {
452
+ "@gradio/atoms": "^0.2.2",
453
+ "@gradio/column": "^0.1.0",
454
+ "@gradio/icons": "^0.2.1",
455
+ "@gradio/utils": "^0.2.0"
456
  }
457
  },
458
+ "node_modules/@gradio/statustracker/node_modules/@gradio/utils": {
459
+ "version": "0.2.0",
460
+ "resolved": "https://registry.npmjs.org/@gradio/utils/-/utils-0.2.0.tgz",
461
+ "integrity": "sha512-YkwzXufi6IxQrlMW+1sFo8Yn6F9NLL69ZoBsbo7QEhms0v5L7pmOTw+dfd7M3dwbRP2lgjrb52i1kAIN3n6aqQ==",
 
 
 
 
 
462
  "dependencies": {
463
+ "@gradio/theme": "^0.2.0",
464
+ "svelte-i18n": "^3.6.0"
 
 
 
465
  }
466
  },
467
+ "node_modules/@gradio/theme": {
468
+ "version": "0.2.0",
469
+ "resolved": "https://registry.npmjs.org/@gradio/theme/-/theme-0.2.0.tgz",
470
+ "integrity": "sha512-33c68Nk7oRXLn08OxPfjcPm7S4tXGOUV1I1bVgzdM2YV5o1QBOS1GEnXPZPu/CEYPePLMB6bsDwffrLEyLGWVQ=="
471
+ },
472
  "node_modules/@gradio/utils": {
473
  "version": "0.2.0-beta.4",
474
  "resolved": "https://registry.npmjs.org/@gradio/utils/-/utils-0.2.0-beta.4.tgz",
 
856
  "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ=="
857
  },
858
  "node_modules/node-gyp-build": {
859
+ "version": "4.7.0",
860
+ "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.7.0.tgz",
861
+ "integrity": "sha512-PbZERfeFdrHQOOXiAKOY0VPbykZy90ndPKk0d+CFDegTKmWp1VgOTz2xACVbr1BjCWxrQp68CXtvNsveFhqDJg==",
862
  "bin": {
863
  "node-gyp-build": "bin.js",
864
  "node-gyp-build-optional": "optional.js",
src/frontend/package.json CHANGED
@@ -13,10 +13,10 @@
13
  "./package.json": "./package.json"
14
  },
15
  "dependencies": {
16
- "@gradio/atoms": "0.2.0-beta.4",
17
- "@gradio/statustracker": "0.3.0-beta.6",
18
- "@gradio/utils": "0.2.0-beta.4",
19
- "@gradio/upload": "0.3.0-beta.4",
20
  "@zerodevx/svelte-json-view": "^1.0.7"
21
  }
22
- }
 
13
  "./package.json": "./package.json"
14
  },
15
  "dependencies": {
16
+ "@gradio/atoms": "^0.2.2",
17
+ "@gradio/client": "^0.8.1",
18
+ "@gradio/statustracker": "^0.3.2",
19
+ "@gradio/utils": "^0.2.0-beta.4",
20
  "@zerodevx/svelte-json-view": "^1.0.7"
21
  }
22
+ }
src/pyproject.toml CHANGED
@@ -8,7 +8,7 @@ build-backend = "hatchling.build"
8
 
9
  [project]
10
  name = "gradio_folium"
11
- version = "0.0.4"
12
  description = "Display Interactive Maps Created with Folium"
13
  readme = "README.md"
14
  license = "Apache-2.0"
@@ -36,7 +36,7 @@ classifiers = [
36
  dev = ["build", "twine"]
37
 
38
  [tool.hatch.build]
39
- artifacts = ["/backend/gradio_folium/templates", "*.pyi", "backend/gradio_folium/templates", "backend/gradio_folium/templates", "backend/gradio_folium/templates", "backend/gradio_folium/templates", "backend/gradio_folium/templates", "backend/gradio_folium/templates", "backend/gradio_folium/templates", "backend/gradio_folium/templates", "backend/gradio_folium/templates"]
40
 
41
  [tool.hatch.build.targets.wheel]
42
  packages = ["/backend/gradio_folium"]
 
8
 
9
  [project]
10
  name = "gradio_folium"
11
+ version = "0.0.5"
12
  description = "Display Interactive Maps Created with Folium"
13
  readme = "README.md"
14
  license = "Apache-2.0"
 
36
  dev = ["build", "twine"]
37
 
38
  [tool.hatch.build]
39
+ artifacts = ["/backend/gradio_folium/templates", "*.pyi", "backend/gradio_folium/templates", "backend/gradio_folium/templates", "backend/gradio_folium/templates", "backend/gradio_folium/templates", "backend/gradio_folium/templates", "backend/gradio_folium/templates", "backend/gradio_folium/templates", "backend/gradio_folium/templates", "backend/gradio_folium/templates", "backend/gradio_folium/templates", "backend/gradio_folium/templates"]
40
 
41
  [tool.hatch.build.targets.wheel]
42
  packages = ["/backend/gradio_folium"]