FabioSantos commited on
Commit
47cea63
·
verified ·
1 Parent(s): f32bbe3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -21,7 +21,7 @@ from transformers import CodeGenTokenizerFast as Tokenizer
21
 
22
  def model_inference(image) -> str:
23
  # Definindo o prompt padrão
24
- prompt = "You are an assistant for visually impaired people, and you can describe the environment around a visually impaired person, identifying objects, people, and obstacles, and even their characteristics, such as color and relative position."
25
  device, dtype = detect_device()
26
  model_id = "vikhyatk/moondream1"
27
  tokenizer = Tokenizer.from_pretrained(model_id)
@@ -56,7 +56,7 @@ def text_to_speech(text):
56
  return audio_buffer
57
 
58
  # Interface Streamlit
59
- st.title('Assistente de Descrição de Imagens')
60
 
61
  # Nota para o usuário sobre a captura de imagem
62
  st.write("Por favor, use uma imagem previamente capturada com a câmera do seu dispositivo ou carregue uma imagem.")
 
21
 
22
  def model_inference(image) -> str:
23
  # Definindo o prompt padrão
24
+ prompt = "You are an assistant and you can describe the environment around a visually impaired person, identifying objects, people, and obstacles, and even their characteristics, such as color and relative position."
25
  device, dtype = detect_device()
26
  model_id = "vikhyatk/moondream1"
27
  tokenizer = Tokenizer.from_pretrained(model_id)
 
56
  return audio_buffer
57
 
58
  # Interface Streamlit
59
+ st.title('Assistente de Visão e Descrição de Imagens')
60
 
61
  # Nota para o usuário sobre a captura de imagem
62
  st.write("Por favor, use uma imagem previamente capturada com a câmera do seu dispositivo ou carregue uma imagem.")