awacke1 commited on
Commit
90bf080
1 Parent(s): bbc0df4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -1,5 +1,11 @@
1
  import gradio as gr
2
  from gradio.mix import Parallel, Series
 
 
 
 
 
 
3
 
4
  description = "BigGAN text-to-image demo."
5
  title = "BigGAN ImageNet"
@@ -8,7 +14,7 @@ Gans=["biggan-deep-128", "biggan-deep-256", "biggan-deep-512"]
8
 
9
  io1 = gr.Interface.load('huggingface/osanseviero/BigGAN-deep-128')
10
  io2 = gr.Interface.load("huggingface/osanseviero/BigGAN-deep-128")
11
- io3 = gr.Interface.load("google/vit-base-patch16-224")
12
  #io3 = gr.Interface.load("huggingface/emilyalsentzer/Bio_Discharge_Summary_BERT")
13
  #io3 = gr.Interface.load("huggingface/google/pegasus-pubmed")
14
  #io3 = gr.Interface.load("huggingface/tennessejoyce/titlewave-t5-base")
 
1
  import gradio as gr
2
  from gradio.mix import Parallel, Series
3
+ from transformers import SegformerFeatureExtractor, SegformerForImageClassification
4
+ from PIL import Image
5
+ import requests
6
+
7
+ feature_extractor = SegformerFeatureExtractor.from_pretrained("nvidia/mit-b0")
8
+ model = SegformerForImageClassification.from_pretrained("nvidia/mit-b0")
9
 
10
  description = "BigGAN text-to-image demo."
11
  title = "BigGAN ImageNet"
 
14
 
15
  io1 = gr.Interface.load('huggingface/osanseviero/BigGAN-deep-128')
16
  io2 = gr.Interface.load("huggingface/osanseviero/BigGAN-deep-128")
17
+ io3 = gr.Interface.load(model)
18
  #io3 = gr.Interface.load("huggingface/emilyalsentzer/Bio_Discharge_Summary_BERT")
19
  #io3 = gr.Interface.load("huggingface/google/pegasus-pubmed")
20
  #io3 = gr.Interface.load("huggingface/tennessejoyce/titlewave-t5-base")