Skip to main content

Experimental empowered iFrame component based on existing HTML gradio component.

Project description

gradio_iframe

A custom gradio component to embed an iframe in a gradio interface. This component is based on the HTML component. It's currently still a work in progress.

Usage

The usage is similar to the HTML component. You can pass valid html and it will be rendered in the interface as an iframe, meaning you can embed any website or webapp that supports iframes. Also, JavaScript should run normal.

You can still pass normal html that's not interactive.

Example

import gradio as gr
from gradio_iframe import iFrame

gr.Interface(
    iFrame(
        label="iFrame Example",
        value=("https://www.youtube.com/watch?v=dQw4w9WgXcQ"),
        show_label=True)
)

Known Issues

There are many reason why it's not a good idea to embed websites in an iframe. See this, or just google "iframe security concerns" for more information. Also, iFrames will use additional computing power and memory, which can slow down the interface.

Also this component is still a work in progress and not fully tested. Use at your own risk.

Other Issues

  • Height does not grow according to the inner component.
  • ...

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gradio_iframe-0.0.4.tar.gz (31.0 kB view details)

Uploaded Source

Built Distribution

gradio_iframe-0.0.4-py3-none-any.whl (22.9 kB view details)

Uploaded Python 3

File details

Details for the file gradio_iframe-0.0.4.tar.gz.

File metadata

  • Download URL: gradio_iframe-0.0.4.tar.gz
  • Upload date:
  • Size: 31.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for gradio_iframe-0.0.4.tar.gz
Algorithm Hash digest
SHA256 213b78c47afb035343f09e2bb6830158ef6ecfe8279059bc4406cf65204a9bb0
MD5 a79468b368d80a8d7dcc52e7a67625de
BLAKE2b-256 b1b5a474f808631cf7dac6994c6fae33cfc0451acafe73b4a04810908140be16

See more details on using hashes here.

File details

Details for the file gradio_iframe-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for gradio_iframe-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9130336d74913ccb064db8aa9fb6e94aa335799fae862a7b988eb500a9fa2e7b
MD5 0ec70564bbcee83e1dab6a7959ebd74f
BLAKE2b-256 387b1d2585d15f32f88bc2da15d0fc07f286f2512c2802d7ab5e6e0563af99d8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page