krypticmouse commited on
Commit
ed498b4
1 Parent(s): 56c2bd0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -20
app.py CHANGED
@@ -29,29 +29,10 @@ description = ""
29
  input = gr.inputs.Image(label="Image to search", type = 'pil', optional=False)
30
  output = gr.outputs.Textbox(type="auto",label="Captions")
31
 
32
- #example_images = sorted([f.as_posix() for f in Path("examples").glob("*.jpg")])
33
- #print(f"Loaded {len(example_images)} example images")
34
  article = "This huggingface presents a demo for Image captioning in Hindi built with VIT Encoder and GPT2 Decoder"
35
- '''interface = gr.Interface(
36
- fn=predict,
37
- inputs=input,
38
- outputs="textbox",
39
- title=title,
40
- description=description,
41
- #examples=example_images,
42
- live=True,
43
- theme="darkpeach"
44
-
45
- )'''
46
 
47
- '''#inp=gr.inputs.Textbox(lines=1, placeholder=None, default="", label="search you query here")
48
- output = gr.outputs.Textbox(type="auto",label="Captions")
49
-
50
- interface = gr.Interface(fn=predict, inputs=input, outputs=output,article=article,title=title,theme="huggingface",layout='vertical')
51
- interface.launch(share=True)'''
52
 
53
- cat_image = "./example_1.jpg"
54
- dog_image = "./example_2.jpg"
55
  interface = gr.Interface(
56
  fn=predict,
57
  inputs = input,
 
29
  input = gr.inputs.Image(label="Image to search", type = 'pil', optional=False)
30
  output = gr.outputs.Textbox(type="auto",label="Captions")
31
 
 
 
32
  article = "This huggingface presents a demo for Image captioning in Hindi built with VIT Encoder and GPT2 Decoder"
 
 
 
 
 
 
 
 
 
 
 
33
 
34
+ example = ["./examples/example_{i}.jpg" for i in range(1,6)]
 
 
 
 
35
 
 
 
36
  interface = gr.Interface(
37
  fn=predict,
38
  inputs = input,