gradio-app / gradio

Build and share delightful machine learning apps, all in Python. 🌟 Star to support our work!
http://www.gradio.app
Apache License 2.0
33.43k stars 2.53k forks source link

Custom Components: README.md doesn't match settings #7105

Closed LennardZuendorf closed 6 months ago

LennardZuendorf commented 9 months ago

Describe the bug

I've been playing around with the custom components and noticed a simple error:

When setting up a component, you ask, i.e., for a license, but when uploading to Huggingface Spaces, the license in the README is not set correctly. Also, the README information from the component README isn't copied, which seems counterintuitive to me...

I'm aware that the src code is not necessarily included in a spaces demo, but still, I think if it is, the readme should be the same or copied with i.e. a little disclaimer as such "# Component Readme". This is kind of a mix between bug and feature request. Hope that's still fine.

Have you searched existing issues? 🔎

Reproduction

Create a custom component, set up a license, and then publish it on Huggingface Hub. I have an MIT license, but in the configuration of the space you set up for Apache 2.0,

Also, upon inspecting the README, you'll see the content between the top-level README in spaces and the README of the custom component doesn't match.

To see the issue, you can check out the spaces .

Screenshot

(Sorry for the light mode; I'm currently testing other stuff. My eyes are also suffering ^^)

Huggingface Spaces README.md

Huggingface Spaces README.md

Component pyproject.toml

pyproject.toml

Component README.md

component README.md (in src)

Logs

No response

System Info

Name: gradio
Version: 4.7.1

Severity

I can work around it

freddyaboulton commented 6 months ago

We're not gonna include the license in the space metadata because it has to match a set of pre-defined keywords (https://huggingface.co/docs/hub/en/repositories-licenses) and I don't want the deployed space to error in case of a typo.

We're going to make it so that the repo readme and the space readme are the same file so users will be able to add the license themselves as well as make any other changes.