isingh commited on
Commit
10d665a
Β·
1 Parent(s): 56c84f4

try a load

Browse files
Files changed (1) hide show
  1. app.py +12 -3
app.py CHANGED
@@ -1,7 +1,16 @@
1
  import gradio as gr
2
 
3
- def greet(name):
4
- return "Hello " + name + "!!"
 
 
 
 
5
 
6
- iface = gr.Interface(fn=greet, inputs="text", outputs="text")
7
  iface.launch()
 
 
 
 
 
 
1
  import gradio as gr
2
 
3
+ """
4
+ pipe = pipeline("classification", model="openai/clip-vit-large-patch14")
5
+ def classify(img):
6
+ predictions = pipe(img)
7
+ pipe(text=["", "a photo of a dog"], images=image, return_tensors="pt", padding=True)
8
+ return predictions
9
 
10
+ iface = gr.Interface(fn=classify, inputs="image", outputs="text")
11
  iface.launch()
12
+ """
13
+
14
+
15
+ iface = gr.Interface.load("huggingface/gradio/clip-vit-large-patch14/")
16
+ iface.launch()