Update app.py
Browse files
app.py
CHANGED
|
@@ -318,6 +318,19 @@ def generate_ccd_description(
|
|
| 318 |
progress(0.3, desc="Running CCD inference (this may take 5-10 minutes on CPU)...")
|
| 319 |
print(f"🔹 Running CCD with {selected_model_name} and expert model {expert_model}...")
|
| 320 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 321 |
ccd_output = ccd_eval(
|
| 322 |
libra_model=model,
|
| 323 |
image=current_img,
|
|
@@ -328,7 +341,11 @@ def generate_ccd_description(
|
|
| 328 |
beta=beta,
|
| 329 |
gamma=gamma
|
| 330 |
)
|
| 331 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 332 |
progress(0.8, desc="Processing results...")
|
| 333 |
|
| 334 |
if use_run_eval:
|
|
|
|
| 318 |
progress(0.3, desc="Running CCD inference (this may take 5-10 minutes on CPU)...")
|
| 319 |
print(f"🔹 Running CCD with {selected_model_name} and expert model {expert_model}...")
|
| 320 |
|
| 321 |
+
|
| 322 |
+
# Debug: Print tokenizer info
|
| 323 |
+
tokenizer = model[0]
|
| 324 |
+
print(f"[DEBUG] Tokenizer pad_token: {tokenizer.pad_token}")
|
| 325 |
+
print(f"[DEBUG] Tokenizer pad_token_id: {tokenizer.pad_token_id}")
|
| 326 |
+
print(f"[DEBUG] Tokenizer eos_token: {tokenizer.eos_token}")
|
| 327 |
+
print(f"[DEBUG] Tokenizer eos_token_id: {tokenizer.eos_token_id}")
|
| 328 |
+
print(f"[DEBUG] Tokenizer padding_side: {getattr(tokenizer, 'padding_side', 'NOT SET')}")
|
| 329 |
+
print(f"[DEBUG] Input prompt: {prompt}")
|
| 330 |
+
print(f"[DEBUG] Input image path: {current_img}")
|
| 331 |
+
print(f"[DEBUG] max_new_tokens: {max_new_tokens}")
|
| 332 |
+
|
| 333 |
+
|
| 334 |
ccd_output = ccd_eval(
|
| 335 |
libra_model=model,
|
| 336 |
image=current_img,
|
|
|
|
| 341 |
beta=beta,
|
| 342 |
gamma=gamma
|
| 343 |
)
|
| 344 |
+
|
| 345 |
+
print(f"[DEBUG] CCD output type: {type(ccd_output)}")
|
| 346 |
+
print(f"[DEBUG] CCD output length: {len(ccd_output) if ccd_output else 0}")
|
| 347 |
+
print(f"[DEBUG] CCD output content: '{ccd_output}'")
|
| 348 |
+
|
| 349 |
progress(0.8, desc="Processing results...")
|
| 350 |
|
| 351 |
if use_run_eval:
|