Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -39,10 +39,11 @@ def image_captioning_ar(image_url, prefix = "a "):
|
|
39 |
text = image_captioning(image_url, prefix=prefix)
|
40 |
return translate_text(text)
|
41 |
return null
|
42 |
-
|
|
|
43 |
imageCaptioning_interface = gr.Interface(
|
44 |
fn = image_captioning_ar,
|
45 |
-
inputs=
|
46 |
outputs=gr.outputs.Textbox(label="Caption"),
|
47 |
title = 'Image captioning',
|
48 |
)
|
|
|
39 |
text = image_captioning(image_url, prefix=prefix)
|
40 |
return translate_text(text)
|
41 |
return null
|
42 |
+
|
43 |
+
input_image = gr.inputs.Image(type="pil", label = 'Upload your image')
|
44 |
imageCaptioning_interface = gr.Interface(
|
45 |
fn = image_captioning_ar,
|
46 |
+
inputs=input_image,
|
47 |
outputs=gr.outputs.Textbox(label="Caption"),
|
48 |
title = 'Image captioning',
|
49 |
)
|