New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gradio-foliumtest

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gradio-foliumtest

Python library for easily interacting with trained machine learning models

  • 0.0.2
  • PyPI
  • Socket score

Maintainers
1

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()

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc