DHEIVER commited on
Commit
c67e1ac
·
verified ·
1 Parent(s): dcf5cf0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -37,20 +37,20 @@ def query_image(Upload_Image, Text, score_threshold):
37
  return Upload_Image, result_labels
38
 
39
 
40
- description = """
41
- You can use AnyVision to query images with text descriptions of any object.
42
- To use it, simply upload an image and enter comma separated text descriptions of objects you want to query the image for. You
43
- can also use the score threshold slider to set a threshold to filter out low probability predictions.
44
-
45
- You can get better predictions by querying the image with text templates used in training the original model: e.g. *"photo of a star-spangled banner"*,
46
- *"image of a shoe"*.
47
  """
48
  demo = gr.Interface(
49
  query_image,
50
  inputs=[gr.Image(), "text", gr.Slider(0, 1, value=0.1)],
51
  outputs="annotatedimage",
52
- title="AnyVision - Zero-Shot Object Detector with Owl2",
53
- description=description
54
  )
55
  demo.launch()
56
 
 
 
37
  return Upload_Image, result_labels
38
 
39
 
40
+ descricao = """
41
+ Você pode usar o AnyVision para consultar imagens com descrições de texto de qualquer objeto.
42
+ Para usá-lo, basta carregar uma imagem e inserir descrições de texto separadas por vírgula dos objetos que deseja consultar na imagem.
43
+ Você também pode usar o controle deslizante de limiar de pontuação para definir um limite para filtrar previsões de baixa probabilidade.
44
+ Você pode obter melhores previsões consultando a imagem com modelos de texto usados no treinamento do modelo original: por exemplo, *"foto de uma bandeira estrelada"*,
45
+ *"imagem de um sapato"*.
 
46
  """
47
  demo = gr.Interface(
48
  query_image,
49
  inputs=[gr.Image(), "text", gr.Slider(0, 1, value=0.1)],
50
  outputs="annotatedimage",
51
+ title="AnyVision - Detector de Objetos Zero-Shot com Owl2",
52
+ description=descricao
53
  )
54
  demo.launch()
55
 
56
+