Skip to content

Refactor gr.Blocks.load() in 4.0 #2754

@abidlabs

Description

@abidlabs

gr.Blocks.load() is both a class method and an instance method, which is confusing. We should refactor this in 4.0.

Here's a proposal:

  • Deprecate gr.Blocks.load() and gr.Interface.load()
  • Instead of the class method, define a gr.load() that can be used to load any Space whether it be Blocks/Interface, or a model
  • For the event trigger, define an instance method Blocks.page_load()

Metadata

Metadata

Assignees

No one assigned

    Labels

    refactorInvolves refactoring existing code

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions