Spaces:
Runtime error
Runtime error
Commit
•
86b2682
1
Parent(s):
5257cda
Update app.py
Browse files
app.py
CHANGED
@@ -29,7 +29,7 @@ input = gr.inputs.Image(type="pil")
|
|
29 |
#example_images = sorted([f.as_posix() for f in Path("examples").glob("*.jpg")])
|
30 |
#print(f"Loaded {len(example_images)} example images")
|
31 |
article = "This huggingface presents a demo for Image captioning in Hindi built with VIT Encoder and GPT2 Decoder"
|
32 |
-
interface = gr.Interface(
|
33 |
fn=predict,
|
34 |
inputs=input,
|
35 |
outputs="textbox",
|
@@ -39,5 +39,10 @@ interface = gr.Interface(
|
|
39 |
live=True,
|
40 |
theme="darkpeach"
|
41 |
|
42 |
-
)
|
43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
29 |
#example_images = sorted([f.as_posix() for f in Path("examples").glob("*.jpg")])
|
30 |
#print(f"Loaded {len(example_images)} example images")
|
31 |
article = "This huggingface presents a demo for Image captioning in Hindi built with VIT Encoder and GPT2 Decoder"
|
32 |
+
'''interface = gr.Interface(
|
33 |
fn=predict,
|
34 |
inputs=input,
|
35 |
outputs="textbox",
|
|
|
39 |
live=True,
|
40 |
theme="darkpeach"
|
41 |
|
42 |
+
)'''
|
43 |
+
|
44 |
+
#inp=gr.inputs.Textbox(lines=1, placeholder=None, default="", label="search you query here")
|
45 |
+
output = gr.outputs.Textbox(type="auto",label="Captions")
|
46 |
+
|
47 |
+
interface = gr.Interface(fn=predict, inputs=input, outputs=output,examples=exp,article=article,title=title,theme="huggingface",layout='vertical')
|
48 |
+
interface.launch(share=True)
|