rmayormartins commited on
Commit
2e5bff4
·
1 Parent(s): 9b44783

Subindo arquivos11

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -71,15 +71,16 @@ def process_image(image):
71
  # Retornar imagem com detecções, descrição e áudio
72
  return Image.fromarray(detected_image), translated_description, "output.mp3"
73
 
74
- # Carregar imagem de exemplo
75
- example_image = Image.open("/mnt/data/example1.JPG")
 
76
 
77
  # Interface Gradio
78
  iface = gr.Interface(
79
  fn=process_image,
80
  inputs=gr.inputs.Image(type="pil"),
81
  outputs=[gr.outputs.Image(type="pil"), gr.outputs.Textbox(), gr.outputs.Audio(type="file")],
82
- examples=[example_image]
83
  )
84
 
85
  iface.launch()
 
71
  # Retornar imagem com detecções, descrição e áudio
72
  return Image.fromarray(detected_image), translated_description, "output.mp3"
73
 
74
+ # Carregar imagem de exemplo diretamente do código
75
+ example_image_path = "example1.JPG"
76
+ example_image = Image.open(example_image_path)
77
 
78
  # Interface Gradio
79
  iface = gr.Interface(
80
  fn=process_image,
81
  inputs=gr.inputs.Image(type="pil"),
82
  outputs=[gr.outputs.Image(type="pil"), gr.outputs.Textbox(), gr.outputs.Audio(type="file")],
83
+ examples=[example_image_path]
84
  )
85
 
86
  iface.launch()