Spaces:
Runtime error
Runtime error
Commit
•
de13eca
1
Parent(s):
397237f
Upload folder using huggingface_hub
Browse files- README.md +3 -3
- __pycache__/app.cpython-310.pyc +0 -0
- app.py +1 -3
- requirements.txt +1 -1
- src/backend/gradio_foliumtest/templates/component/index.js +2 -2
- src/demo/app.py +1 -3
- src/frontend/Index.svelte +0 -7
- src/pyproject.toml +2 -2
README.md
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
|
2 |
---
|
3 |
tags: [gradio-custom-component, gradio-template-Fallback]
|
4 |
-
title: gradio_foliumtest V0.0.
|
5 |
-
colorFrom:
|
6 |
-
colorTo:
|
7 |
sdk: docker
|
8 |
pinned: false
|
9 |
license: apache-2.0
|
|
|
1 |
|
2 |
---
|
3 |
tags: [gradio-custom-component, gradio-template-Fallback]
|
4 |
+
title: gradio_foliumtest V0.0.2
|
5 |
+
colorFrom: purple
|
6 |
+
colorTo: indigo
|
7 |
sdk: docker
|
8 |
pinned: false
|
9 |
license: apache-2.0
|
__pycache__/app.cpython-310.pyc
CHANGED
Binary files a/__pycache__/app.cpython-310.pyc and b/__pycache__/app.cpython-310.pyc differ
|
|
app.py
CHANGED
@@ -3,8 +3,6 @@ import gradio as gr
|
|
3 |
from gradio_foliumtest import FoliumTest
|
4 |
from typing import Literal
|
5 |
from folium import Map
|
6 |
-
import random
|
7 |
-
|
8 |
|
9 |
LAT_LONG_MAP = {
|
10 |
"New York City": (40.7128, -74.0060),
|
@@ -24,7 +22,7 @@ with gr.Blocks() as demo:
|
|
24 |
city = gr.Radio(choices=["New York City", "London", "San Francisco", "Tokyo", "Miami"],
|
25 |
label="City")
|
26 |
with gr.Column():
|
27 |
-
map_ = FoliumTest(label="
|
28 |
city.select(get_city, city, map_)
|
29 |
|
30 |
demo.launch()
|
|
|
3 |
from gradio_foliumtest import FoliumTest
|
4 |
from typing import Literal
|
5 |
from folium import Map
|
|
|
|
|
6 |
|
7 |
LAT_LONG_MAP = {
|
8 |
"New York City": (40.7128, -74.0060),
|
|
|
22 |
city = gr.Radio(choices=["New York City", "London", "San Francisco", "Tokyo", "Miami"],
|
23 |
label="City")
|
24 |
with gr.Column():
|
25 |
+
map_ = FoliumTest(label="Map")
|
26 |
city.select(get_city, city, map_)
|
27 |
|
28 |
demo.launch()
|
requirements.txt
CHANGED
@@ -1 +1 @@
|
|
1 |
-
gradio_foliumtest-0.0.
|
|
|
1 |
+
gradio_foliumtest-0.0.2-py3-none-any.whl
|
src/backend/gradio_foliumtest/templates/component/index.js
CHANGED
@@ -2145,7 +2145,7 @@ function wn(n) {
|
|
2145 |
p(l, i) {
|
2146 |
const f = {};
|
2147 |
i & /*$$scope*/
|
2148 |
-
|
2149 |
},
|
2150 |
i(l) {
|
2151 |
t || (B(e.$$.fragment, l), t = !0);
|
@@ -2314,7 +2314,7 @@ function vn(n) {
|
|
2314 |
l[5]), i & /*min_width*/
|
2315 |
64 && (f.min_width = /*min_width*/
|
2316 |
l[6]), i & /*$$scope, new_value, label, height, value, gradio, loading_status*/
|
2317 |
-
|
2318 |
},
|
2319 |
i(l) {
|
2320 |
t || (B(e.$$.fragment, l), t = !0);
|
|
|
2145 |
p(l, i) {
|
2146 |
const f = {};
|
2147 |
i & /*$$scope*/
|
2148 |
+
32768 && (f.$$scope = { dirty: i, ctx: l }), e.$set(f);
|
2149 |
},
|
2150 |
i(l) {
|
2151 |
t || (B(e.$$.fragment, l), t = !0);
|
|
|
2314 |
l[5]), i & /*min_width*/
|
2315 |
64 && (f.min_width = /*min_width*/
|
2316 |
l[6]), i & /*$$scope, new_value, label, height, value, gradio, loading_status*/
|
2317 |
+
36744 && (f.$$scope = { dirty: i, ctx: l }), e.$set(f);
|
2318 |
},
|
2319 |
i(l) {
|
2320 |
t || (B(e.$$.fragment, l), t = !0);
|
src/demo/app.py
CHANGED
@@ -3,8 +3,6 @@ import gradio as gr
|
|
3 |
from gradio_foliumtest import FoliumTest
|
4 |
from typing import Literal
|
5 |
from folium import Map
|
6 |
-
import random
|
7 |
-
|
8 |
|
9 |
LAT_LONG_MAP = {
|
10 |
"New York City": (40.7128, -74.0060),
|
@@ -24,7 +22,7 @@ with gr.Blocks() as demo:
|
|
24 |
city = gr.Radio(choices=["New York City", "London", "San Francisco", "Tokyo", "Miami"],
|
25 |
label="City")
|
26 |
with gr.Column():
|
27 |
-
map_ = FoliumTest(label="
|
28 |
city.select(get_city, city, map_)
|
29 |
|
30 |
demo.launch()
|
|
|
3 |
from gradio_foliumtest import FoliumTest
|
4 |
from typing import Literal
|
5 |
from folium import Map
|
|
|
|
|
6 |
|
7 |
LAT_LONG_MAP = {
|
8 |
"New York City": (40.7128, -74.0060),
|
|
|
22 |
city = gr.Radio(choices=["New York City", "London", "San Francisco", "Tokyo", "Miami"],
|
23 |
label="City")
|
24 |
with gr.Column():
|
25 |
+
map_ = FoliumTest(label="Map")
|
26 |
city.select(get_city, city, map_)
|
27 |
|
28 |
demo.launch()
|
src/frontend/Index.svelte
CHANGED
@@ -7,7 +7,6 @@
|
|
7 |
import type { LoadingStatus } from "@gradio/statustracker";
|
8 |
import type { FileData } from "@gradio/client";
|
9 |
import { normalise_file } from "@gradio/client";
|
10 |
-
import { tick } from "svelte";
|
11 |
|
12 |
// General Block Props
|
13 |
export let elem_id = "";
|
@@ -32,12 +31,6 @@
|
|
32 |
|
33 |
let new_value: FileData | null;
|
34 |
|
35 |
-
async function handle_change(value, new_value) {
|
36 |
-
await tick();
|
37 |
-
value = new_value;
|
38 |
-
gradio.dispatch("change");
|
39 |
-
}
|
40 |
-
|
41 |
$: new_value = normalise_file(value, root, proxy_url);
|
42 |
let old_value = new_value;
|
43 |
|
|
|
7 |
import type { LoadingStatus } from "@gradio/statustracker";
|
8 |
import type { FileData } from "@gradio/client";
|
9 |
import { normalise_file } from "@gradio/client";
|
|
|
10 |
|
11 |
// General Block Props
|
12 |
export let elem_id = "";
|
|
|
31 |
|
32 |
let new_value: FileData | null;
|
33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
$: new_value = normalise_file(value, root, proxy_url);
|
35 |
let old_value = new_value;
|
36 |
|
src/pyproject.toml
CHANGED
@@ -8,7 +8,7 @@ build-backend = "hatchling.build"
|
|
8 |
|
9 |
[project]
|
10 |
name = "gradio_foliumtest"
|
11 |
-
version = "0.0.
|
12 |
description = "Python library for easily interacting with trained machine learning models"
|
13 |
readme = "README.md"
|
14 |
license = "Apache-2.0"
|
@@ -43,7 +43,7 @@ classifiers = [
|
|
43 |
dev = ["build", "twine"]
|
44 |
|
45 |
[tool.hatch.build]
|
46 |
-
artifacts = ["/backend/gradio_foliumtest/templates", "*.pyi", "backend/gradio_foliumtest/templates", "backend/gradio_foliumtest/templates", "backend/gradio_foliumtest/templates", "backend/gradio_foliumtest/templates", "backend/gradio_foliumtest/templates", "backend/gradio_foliumtest/templates"]
|
47 |
|
48 |
[tool.hatch.build.targets.wheel]
|
49 |
packages = ["/backend/gradio_foliumtest"]
|
|
|
8 |
|
9 |
[project]
|
10 |
name = "gradio_foliumtest"
|
11 |
+
version = "0.0.2"
|
12 |
description = "Python library for easily interacting with trained machine learning models"
|
13 |
readme = "README.md"
|
14 |
license = "Apache-2.0"
|
|
|
43 |
dev = ["build", "twine"]
|
44 |
|
45 |
[tool.hatch.build]
|
46 |
+
artifacts = ["/backend/gradio_foliumtest/templates", "*.pyi", "backend/gradio_foliumtest/templates", "backend/gradio_foliumtest/templates", "backend/gradio_foliumtest/templates", "backend/gradio_foliumtest/templates", "backend/gradio_foliumtest/templates", "backend/gradio_foliumtest/templates", "backend/gradio_foliumtest/templates"]
|
47 |
|
48 |
[tool.hatch.build.targets.wheel]
|
49 |
packages = ["/backend/gradio_foliumtest"]
|