Spaces:
Runtime error
Runtime error
Update model.py
Browse files
model.py
CHANGED
@@ -42,8 +42,12 @@ def answer_question(image, question):
|
|
42 |
msgs=msgs,
|
43 |
tokenizer=tokenizer,
|
44 |
sampling=True,
|
45 |
-
temperature=0.7,
|
46 |
stream=True,
|
|
|
|
|
|
|
|
|
|
|
47 |
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.",
|
48 |
)
|
49 |
|
|
|
42 |
msgs=msgs,
|
43 |
tokenizer=tokenizer,
|
44 |
sampling=True,
|
|
|
45 |
stream=True,
|
46 |
+
top_p=0.8,
|
47 |
+
top_k=100,
|
48 |
+
temperature=0.7,
|
49 |
+
repetition_penalty=1.05,
|
50 |
+
max_new_tokens=2048,
|
51 |
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.",
|
52 |
)
|
53 |
|