ai-forever / mgpt

Multilingual Generative Pretrained Model
Other
202 stars 22 forks source link

add web demo to Huggingface #2

Closed AK391 closed 2 years ago

AK391 commented 2 years ago

Hi, would you be interested in adding mgpt web demo to Hugging Face using Gradio in the https://huggingface.co/sberbank-ai organization?

here is a guide for adding spaces to your org

How to add a Space: https://huggingface.co/blog/gradio-spaces

Example spaces with repos: github: https://github.com/salesforce/BLIP Spaces: https://huggingface.co/spaces/salesforce/BLIP

github: https://github.com/facebookresearch/omnivore Spaces: https://huggingface.co/spaces/akhaliq/omnivore

a Gradio Demo can be setup in 2 lines of code using the inference api integration through huggingface

import gradio as gr
gr.Interface.load("huggingface/sberbank-ai/mGPT").launch()

would launch the demo

Please let us know if you would be interested and if you have any questions.

TatianaShavrina commented 2 years ago

Thank you so much, @AK391 !

I've added an HF space app here: https://huggingface.co/spaces/sberbank-ai/mGPT

Any suggestions or ideas ow to further enhance it?

AK391 commented 2 years ago

@TatianaShavrina Looks great, thanks, the input component for prompts can be made bigger by using lines=5, so instead of doing

inputs="text" it would be inputs=gr.inputs.Textbox(lines=5)

AK391 commented 2 years ago

also the demo can be linked in the readme with a huggingface badge similar to https://github.com/stylegan-human/StyleGAN-Human#web-demo

So it would be like this

Integrated into Huggingface Spaces 🤗 using Gradio. Try out the Web Demo: Hugging Face Spaces