MrSalman commited on
Commit
bba69da
1 Parent(s): c83c73b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
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=gr.inputs.Textbox(lines = 7, label = 'Image url'),
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
  )