Skip to content

A few small fixes#1171

Merged
abidlabs merged 9 commits into
mainfrom
small-things
May 6, 2022
Merged

A few small fixes#1171
abidlabs merged 9 commits into
mainfrom
small-things

Conversation

@abidlabs
Copy link
Copy Markdown
Member

@abidlabs abidlabs commented May 6, 2022

Fixes a few small things I noticed as I was building demos / writing the Blocks guide

  • allow markdown to be set dynamically (i.e. used as an output component)
  • provide aliases for components that have a 2-word name in case people use the wrong case (i.e. gr.DataFrame is now equivalent to gr.Dataframe) -- Closes: Rename (or accept both names) Dataframe to DataFrame #1110
  • allows you to set inputs=None or outputs=None to an event trigger
  • removed a flaky test

@abidlabs abidlabs requested a review from aliabid94 May 6, 2022 06:41
Copy link
Copy Markdown
Contributor

@aliabid94 aliabid94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, small comments

Comment thread gradio/__init__.py
Slider,
StatusTracker,
Textbox,
TimeSeries,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why twuce, typo?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Different spelling (or casing actually)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TimeSeries vs Timeseries

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is what you're referring to, right?

Comment thread gradio/interface.py

self.interface_type = self.InterfaceTypes.STANDARD
if inputs is None and outputs is None:
if (inputs is None or inputs == []) and (outputs is None or outputs == []):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since you call super.init() first, you could just check if self.inputs == [].

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where in Blocks() do I assign self.inputs?

@abidlabs abidlabs merged commit 4bd609b into main May 6, 2022
@abidlabs abidlabs deleted the small-things branch May 6, 2022 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rename (or accept both names) Dataframe to DataFrame

2 participants