How to link the spaces with arxiv

Hi,

I found that there is a new feature in arXiv which connects the HF spaces demo into the corresponding paper.

I’m just curious about how I link my HF spaces demo to my paper.
For me, I want to link my demo in CVPR 2022 space (Talking Face Generation with Multilingual TTS - a Hugging Face Space by CVPR) to the corresponding paper ([2205.06421] Talking Face Generation with Multilingual TTS).

Thank you in advance.

1 Like

hi @deepkyu, at the moment the integration happens from a Model page with reference to an arXiv link and that model has to be linked to your Space. For instance CompVis/stable-diffusion-v1-4 · Hugging Face has references to arXiv papers, and this Space Stable Diffusion 2 - a Hugging Face Space by stabilityai has a link to that model.
Here’s what you can do

  1. Create a model page with info and links to your arXiv paper inside the README.md
  2. On your Space project app.py add a comment on the first line point to the Model page
# https://huggingface.co/deepkyu/MODEL-PAGE

I hope that will do the job. I’ll report this internally and see if there’s a better workflow in the future

Thanks

1 Like

Hi @radames,

So, the HF model is actually linked to the arXiv paper, and HF Space should use the model for now.
I found the model FAQ (Frequently Asked Questions), but have never thought like that.

Thank you for your clear explanation :smile: It really helps a lot.

It perfectly works! Thank you again @radames :smile:

now there is also a documentation page for future reference

1 Like

Thank you @deepkyu for sharing this process on twitter and @radames for further documenting.

IIUC, there is currently no workflow for connecting an arxiv paper about a method or eval technique, with the demos of that method, because this fails the prereq that the paper is “associated with a model or a dataset that is on the Hugging Face Hub”.

e.g.

I think this is pretty clear from the documentation, I just wanted to make sure I am understanding correctly… before I ponder too deeply work-arounds (e.g. I totally could upload a small challenge dataset created for the paper).

hi @emilylearning you’re right, however you can always create a Model with a simple Model Card / README.md linking to your arXiv Paper and referencing it on your Space demo. Like @deepkyu did here deepkyu/ml-talking-face · Hugging Face.

2 Likes

Ahh, sorry I missed that @deepkyu’s model card had the explicit purpose of linking the space and the paper. This is my exact solution. I should have just followed the steps more closely. Thanks for the follow up.

2 Likes

we’ll discuss internally to maybe be able to link directly a Space <> ArXiv paper (without having to link via a model or a dataset)

We’ll update this thread if we do this!

4 Likes

Thanks for this update! This linking is such a wonderful feature for researchers like me, who really need a compelling demo to convince people the arxiv paper is worth reading.

This process worked wonderfully for me, with one caveat.

When I attempted to follow this final step below:

Note : You can also add linked models or datasets manually by explicitly updating them in the README metadata for the Space, as described here.

…the link to arxiv appeared to not manifest. I was distractedly editing from UI, so could have been my own error or impatience.

However, when I instead tried to link the model card url directly in app.py (rather than in the README), it did appear to work almost instantly.

More details in this commit:

Thanks again for all the support!

Hi @emilylearning, now sure what went wrong with your original flow. However, @julien-c did push a new backend feature also linking Spaces with arXiv papers directly. That why it’s working :raised_hands: and it’s much easier now. Thanks

1 Like

hah, amazing! so fast! Thank you!

1 Like

Hi, thank you all for sharing your insight into the process. I am having no luck linking my demo to arxiv so far. All the links to arxiv (on the model page and the space) link to the correct paper as described in the documentation. Could any of the following two circumstances cause an issue?

  • Private model repository
  • Demo hosted in organization space

Hi @St0nedB , sorry you having issues. Is the demo also private? I don’t think it would work if either Model or Space demo is private. If the the Model is private and the Space Demo is not, you can add a link to your arXiv paper inside your Space, README.md or a comment on you code app.py, this is working since yesterday. Thanks

Hi @radames, sorry for the late reply. I tried your suggestion but it doesn’t seem to be working.
My setup is as follows:

  • the model is private. its page correctly shows the link to the arXiv paper
  • the space holding the demo is public (in an organization, as our group wants to have one place to have all our demos)

Both the app.py and the README.md contain links to the arXiv paper. In the app.py the link is placed as a comment on the first line. In the README.md it is a Markdown-formatted link.
Any ideas about what could be the issue?

hi @St0nedB, sorry, I was too precipitated, and the arXiv integration direct to Spaces is not ready yet. So if you have a private model, create a public model with a simple README.md model card pointing to your arXiv paper, then link that public model into your Space. example deepkyu/ml-talking-face · Hugging Face link to model page here app.py · CVPR/ml-talking-face at main

Please let us know if that works for you.

That did the trick. Thanks for helping out!

1 Like