Spaces:
Runtime error
Runtime error
Add application file
Browse files
app.py
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
|
3 |
+
models = {
|
4 |
+
# "object-detection": "facebook/detr-resnet-50",
|
5 |
+
"image-classification": "microsoft/resnet-50",
|
6 |
+
"text-to-image": "cagliostrolab/animagine-xl-3.0",
|
7 |
+
"image-to-text": "Salesforce/blip-image-captioning-large",
|
8 |
+
"audio-classification": "speechbrain/emotion-recognition-wav2vec2-IEMOCAP",
|
9 |
+
"audio-to-audio": "speechbrain/mtl-mimic-voicebank",
|
10 |
+
"automatic-speech-recognition": "jonatasgrosman/wav2vec2-large-xlsr-53-english",
|
11 |
+
"conversational": "microsoft/DialoGPT-medium",
|
12 |
+
"feature-extraction": "cambridgeltl/SapBERT-from-PubMedBERT-fulltext",
|
13 |
+
"fill-mask": "bert-base-uncased",
|
14 |
+
"question-answering": "deepset/roberta-base-squad2",
|
15 |
+
"summarization": "facebook/bart-large-cnn",
|
16 |
+
"text-classification": "cardiffnlp/twitter-roberta-base-sentiment-latest",
|
17 |
+
"text-generation": "gpt2",
|
18 |
+
"text2text-generation": "vennify/t5-base-grammar-correction",
|
19 |
+
"translation": "Helsinki-NLP/opus-mt-fr-en",
|
20 |
+
"zero-shot-classification": "facebook/bart-large-mnli",
|
21 |
+
"sentence-similarity": "sentence-transformers/all-mpnet-base-v2",
|
22 |
+
"text-to-speech": "facebook/mms-tts-eng",
|
23 |
+
"token-classification": "benjamin/wtp-canine-s-1l",
|
24 |
+
"document-question-answering": "fxmarty/tiny-doc-qa-vision-encoder-decoder",
|
25 |
+
"visual-question-answering": "Salesforce/blip-vqa-capfilt-large",
|
26 |
+
}
|
27 |
+
|
28 |
+
with gr.Blocks() as demo:
|
29 |
+
gr.Markdown("## Gradio Pipelines Tasks")
|
30 |
+
for k, v in models.items():
|
31 |
+
with gr.Tab(k):
|
32 |
+
gr.load(v, src="models")
|
33 |
+
demo.launch()
|
34 |
+
|