Update app.py
Browse files
app.py
CHANGED
@@ -92,6 +92,11 @@ def analyze_image():
|
|
92 |
# Final model prompt
|
93 |
model_prompt = f" {combined_prompt or 'Response:'}"
|
94 |
|
|
|
|
|
|
|
|
|
|
|
95 |
# Prepare input to model
|
96 |
inputs = processor(
|
97 |
text=model_prompt,
|
|
|
92 |
# Final model prompt
|
93 |
model_prompt = f" {combined_prompt or 'Response:'}"
|
94 |
|
95 |
+
if image:
|
96 |
+
combined_prompt = f"<start_of_image> {combined_prompt or 'Findings:'}"
|
97 |
+
else:
|
98 |
+
combined_prompt = combined_prompt or "Findings:"
|
99 |
+
|
100 |
# Prepare input to model
|
101 |
inputs = processor(
|
102 |
text=model_prompt,
|