|
import gradio as gr |
|
|
|
models = { |
|
|
|
"image-classification": "microsoft/resnet-50", |
|
"text-to-image": "runwayml/stable-diffusion-v1-5", |
|
"image-to-text": "nlpconnect/vit-gpt2-image-captioning", |
|
"audio-classification": "mtg-upf/discogs-maest-30s-pw-73e-ts", |
|
"audio-to-audio": "speechbrain/mtl-mimic-voicebank", |
|
"automatic-speech-recognition": "jonatasgrosman/wav2vec2-large-xlsr-53-english", |
|
"conversational": "microsoft/DialoGPT-medium", |
|
"feature-extraction": "cambridgeltl/SapBERT-from-PubMedBERT-fulltext", |
|
"fill-mask": "bert-base-uncased", |
|
"question-answering": "deepset/roberta-base-squad2", |
|
"summarization": "facebook/bart-large-cnn", |
|
"text-classification": "cardiffnlp/twitter-roberta-base-sentiment-latest", |
|
"text-generation": "gpt2", |
|
"text2text-generation": "vennify/t5-base-grammar-correction", |
|
"translation": "Helsinki-NLP/opus-mt-fr-en", |
|
"zero-shot-classification": "facebook/bart-large-mnli", |
|
"sentence-similarity": "sentence-transformers/all-mpnet-base-v2", |
|
"text-to-speech": "facebook/mms-tts-eng", |
|
"token-classification": "benjamin/wtp-canine-s-1l", |
|
"document-question-answering": "fxmarty/tiny-doc-qa-vision-encoder-decoder", |
|
"visual-question-answering": "Salesforce/blip-vqa-capfilt-large", |
|
} |
|
|
|
with gr.Blocks() as demo: |
|
gr.Markdown("## Gradio Pipelines Tasks") |
|
for k, v in models.items(): |
|
with gr.Tab(k): |
|
gr.load(v, src="models") |
|
demo.launch() |
|
|
|
|