gradio_foliumtest
Create a map with folium and display it on the web with Gradio!
Example usage
import gradio as gr
from gradio_foliumtest import FoliumTest
from typing import Literal
from folium import Map
LAT_LONG_MAP = {
"New York City": (40.7128, -74.0060),
"London": (51.5074, -0.1278),
"San Francisco": (37.7749, -122.4194),
"Tokyo": (35.6762, 139.6503),
"Miami": (25.7617, -80.1918),
}
def get_city(city: Literal["New York City", "London", "San Francisco", "Tokyo", "Miami"]):
city = city or "Miami"
return Map(location=LAT_LONG_MAP[city], zoom_start=12)
with gr.Blocks() as demo:
with gr.Row():
with gr.Column():
city = gr.Radio(choices=["New York City", "London", "San Francisco", "Tokyo", "Miami"],
label="City")
with gr.Column():
map_ = FoliumTest(label="Foo")
city.change(get_city, city, map_)
demo.launch()
Metadata
Release files for gradio-foliumtest 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gradio_foliumtest-0.0.2.tar.gz | 32.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gradio_foliumtest-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 56.0 kB
Release files / gradio_foliumtest-0.0.2.tar.gz
| Download URL | gradio_foliumtest-0.0.2.tar.gz |
|---|---|
| Size | 32.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
220c139a751dac55e65475374d387cd4676d016e2994e0f6351108d77835a725
|
|
BLAKE2b-256 checksum How to use checksums |
3b85a813a4f65d064c9354b2a7654a4da3ebe6d23caed2f99db4c2f15aa8156f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.13
|
Release files / gradio_foliumtest-0.0.2-py3-none-any.whl
| Download URL | gradio_foliumtest-0.0.2-py3-none-any.whl |
|---|---|
| Size | 23.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5e4e131ec05befb2064310f3b4ec2eab963ef8e5983f1b353f4e46970f7b6405
|
|
BLAKE2b-256 checksum How to use checksums |
dae029917632627ce5fe33ecd0e2da75f0be04be67eb7d83ffb11aa7855a9add
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.13
|