Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -304,7 +304,9 @@ def run_pipeline(image: PILImage.Image, prompt: str):
|
|
| 304 |
masks_np=[mask_np],
|
| 305 |
alpha=0.6
|
| 306 |
)
|
| 307 |
-
|
|
|
|
|
|
|
| 308 |
return output_text, visualized_img
|
| 309 |
except Exception as e:
|
| 310 |
print(f"Pipeline error: {e}")
|
|
|
|
| 304 |
masks_np=[mask_np],
|
| 305 |
alpha=0.6
|
| 306 |
)
|
| 307 |
+
match = re.search(r'(<think>.*?</think>)', output_text, re.DOTALL)
|
| 308 |
+
if match:
|
| 309 |
+
output_text = match.group(1)
|
| 310 |
return output_text, visualized_img
|
| 311 |
except Exception as e:
|
| 312 |
print(f"Pipeline error: {e}")
|