mrtroydev's picture
Upload folder using huggingface_hub
3883c60 verified

A newer version of the Gradio SDK is available: 4.37.2

Upgrade

Extension base

What is this about?

The extension base shows the files that the extension loader will check for.

Structure

Extensions are placed in the extensions folder.

2 different descriptions below, same structure, pick the one you understand best.

As markdown list
  • extension
    • extension.json (required)
    • main.py
    • requirements.py
    • style.py
    • scripts
      • script.js
As file path list

extension/extension.json (required)
extension/main.py
extension/requirements.py
extension/style.py
extension/scripts/script.js

File contents

extension/requirements.py: Refer to Requirements docs
extension/style.py: Refer to SimpleStyle docs
extension/scripts/script.js: Refer to Custom javascript docs

extension/extension.json:

{
  "name": "Extension name",
  "description": "This extension does nothing.",
  "author": "GitMylo",
  "tags": []
}

extension/main.py:

# Put any code here, such as callback registers etc. This code will be ran after install, on plugin init.