RohitCSharp commited on
Commit
8c2efc1
·
verified ·
1 Parent(s): 209652e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py CHANGED
@@ -34,6 +34,22 @@ def generate_caption(image):
34
  caption = texts[best_match]
35
  return f"Best match: {caption} (Confidence: {probs[0][best_match].item():.2f})"
36
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
  iface = gr.Interface(
38
  fn=generate_caption,
39
  inputs=gr.Image(type="pil"),
 
34
  caption = texts[best_match]
35
  return f"Best match: {caption} (Confidence: {probs[0][best_match].item():.2f})"
36
 
37
+ note = gr.Markdown("""
38
+ **Note:** This model detects the best match from the following options:
39
+ - a photo of a cat
40
+ - a photo of a dog
41
+ - a photo of a man
42
+ - a photo of a woman
43
+ - a photo of a laptop
44
+ - a photo of a smartphone
45
+ - a photo of a city
46
+ - a photo of a landscape
47
+ - a photo of food
48
+ - a photo of a car
49
+ """)
50
+
51
+ note.render()
52
+
53
  iface = gr.Interface(
54
  fn=generate_caption,
55
  inputs=gr.Image(type="pil"),