Spaces:
Runtime error
Runtime error
krypticmouse
commited on
Commit
•
ed498b4
1
Parent(s):
56c2bd0
Update app.py
Browse files
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 |
-
|
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,
|