sitammeur commited on
Commit
0fd7d62
1 Parent(s): e30a3be

Added the system prompt

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -22,7 +22,7 @@ model.eval()
22
  @spaces.GPU(duration=120)
23
  def answer_question(image, question):
24
  """
25
- Generates an answer to a given question based on the provided image and text.
26
 
27
  Args:
28
  image (str): The path to the image file.
@@ -43,6 +43,7 @@ def answer_question(image, question):
43
  sampling=True,
44
  temperature=0.7,
45
  stream=True,
 
46
  )
47
 
48
  # Return the answer
 
22
  @spaces.GPU(duration=120)
23
  def answer_question(image, question):
24
  """
25
+ Generates an answer to a given question based on the provided image and question.
26
 
27
  Args:
28
  image (str): The path to the image file.
 
43
  sampling=True,
44
  temperature=0.7,
45
  stream=True,
46
+ system_prompt="You are an AI assistant specialized in visual content analysis. Given an image and a related question, analyze the image thoroughly and provide a precise and informative answer based on the visible content. Ensure your response is clear, accurate, and directly addresses the question.",
47
  )
48
 
49
  # Return the answer