Dabs commited on
Commit
a09a6e6
1 Parent(s): 057813a

title and description

Browse files
Files changed (1) hide show
  1. app.py +9 -3
app.py CHANGED
@@ -1,3 +1,4 @@
 
1
  import gradio as gr
2
  from transformers import pipeline
3
  import numpy as np
@@ -15,8 +16,13 @@ def shot(image, labels_text):
15
  hypothesis_template= "This is a photo of a {}")
16
  return {dic["label"]: dic["score"] for dic in res}
17
 
18
- iface = gr.Interface(shot, ["image", "text"], "label", examples=[["dog.jpg", "dog,cat,bird"],
19
- ["germany.jpg", "germany,belgium,colombia"],
20
- ["colombia.jpg", "germany,belgium,colombia"]])
 
 
 
 
 
21
 
22
  iface.launch()
 
1
+ from turtle import title
2
  import gradio as gr
3
  from transformers import pipeline
4
  import numpy as np
 
16
  hypothesis_template= "This is a photo of a {}")
17
  return {dic["label"]: dic["score"] for dic in res}
18
 
19
+ iface = gr.Interface(shot,
20
+ ["image", "text"],
21
+ "label",
22
+ examples=[["dog.jpg", "dog,cat,bird"],
23
+ ["germany.jpg", "germany,belgium,colombia"],
24
+ ["colombia.jpg", "germany,belgium,colombia"]],
25
+ description="Add a picture and a list of labels separated by commas",
26
+ title="Zero-shot Image Classification")
27
 
28
  iface.launch()