Spaces:
Runtime error
Runtime error
import gradio as gr | |
from gradio.mix import Parallel, Series | |
from transformers import SegformerFeatureExtractor, SegformerForImageClassification | |
from PIL import Image | |
import requests | |
feature_extractor = SegformerFeatureExtractor.from_pretrained("nvidia/mit-b0") | |
model = SegformerForImageClassification.from_pretrained("nvidia/mit-b0") | |
description = "BigGAN text-to-image demo." | |
title = "BigGAN ImageNet" | |
Gans=["biggan-deep-128", "biggan-deep-256", "biggan-deep-512"] | |
io1 = gr.Interface.load('huggingface/osanseviero/BigGAN-deep-128') | |
io2 = gr.Interface.load("huggingface/osanseviero/BigGAN-deep-128") | |
io3 = gr.Interface.load(model) | |
#io3 = gr.Interface.load("huggingface/emilyalsentzer/Bio_Discharge_Summary_BERT") | |
#io3 = gr.Interface.load("huggingface/google/pegasus-pubmed") | |
#io3 = gr.Interface.load("huggingface/tennessejoyce/titlewave-t5-base") | |
# = Parallel(io1, io2, io3, | |
interface = Parallel(io1,io2,io3, | |
description=description, | |
title = title, | |
examples=[ | |
["lighthouse"], | |
["eyeglasses"], | |
["stool"], | |
["window"], | |
["hand"], | |
["dice"], | |
["cloud"], | |
["gate"], | |
["cat"], | |
["toes"] | |
] | |
) | |
interface.launch() |