Spaces:
Runtime error
Runtime error
Added the system prompt
Browse files
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
|
| 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
|