Skip to content

Fix #327 set default row of gradio webui to 1 and drop empty/blank row#335

Merged
lvwerra merged 1 commit into
huggingface:mainfrom
Raibows:main
Nov 8, 2022
Merged

Fix #327 set default row of gradio webui to 1 and drop empty/blank row#335
lvwerra merged 1 commit into
huggingface:mainfrom
Raibows:main

Conversation

@Raibows

@Raibows Raibows commented Nov 1, 2022

Copy link
Copy Markdown
Contributor

Fix #327 .
Here are the changes:

  1. set the default number of row of dataFrame of launch_gradio_widget to 1
  2. First replace all blank/empty input rows with np.nan which then could be dropped by the following np.dropna

Happy to take advice.😀 @lvwerra

@lvwerra

lvwerra commented Nov 2, 2022

Copy link
Copy Markdown
Member

Awesome, thanks @Raibows! Would you mind running make style && make quality to make the code quality checks happy?

@Raibows

Raibows commented Nov 2, 2022

Copy link
Copy Markdown
Contributor Author

Awesome, thanks @Raibows! Would you mind running make style && make quality to make the code quality checks happy?

I have runned make style && make quality to reformat the codes. But the github auto checks remained failed status. I guess maybe the difference versions of black caused it. I use python 3.8.10 with black 21.6b0.

Do you have any advice on it? Thanks.

@HuggingFaceDocBuilderDev

HuggingFaceDocBuilderDev commented Nov 2, 2022

Copy link
Copy Markdown

The documentation is not available anymore as the PR was closed or merged.

@lvwerra

lvwerra commented Nov 2, 2022

Copy link
Copy Markdown
Member

Yes, indeed strange, it changed a few files it shouldn't have. I am using black==22.8.0. If that doesn't work I think just reverting the changes on the tokenizer and file_utils files should fix it.

@Raibows

Raibows commented Nov 2, 2022

Copy link
Copy Markdown
Contributor Author

@lvwerra I have reverted these changes. Now it only formats the gradio.py. Please check it.

Update: Sorry for that I forgot to install the isort package. I run the style reformat again. And these commits are squashed to one.

@lvwerra
lvwerra merged commit fad87d8 into huggingface:main Nov 8, 2022
NimaBoscarino pushed a commit to NimaBoscarino/evaluate that referenced this pull request Nov 9, 2022
…ty/blank row (huggingface#335)

set default row of gradio webui to 1 and drop empty/blank row
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.

default blank row of launch_gradio_widget in web demo app may confuse users

3 participants