ssboost commited on
Commit
04b4200
Β·
verified Β·
1 Parent(s): 9b38e32

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -272,7 +272,7 @@ def wrapper_modified(keyword, korean_only, apply_main_keyword_option, exclude_ze
272
  logger.error(f"파일 볡사 였λ₯˜: {file_error}")
273
 
274
  return (
275
- gr.update(value=table_html),
276
  gr.update(choices=cat_choices),
277
  gr.update(choices=vol_choices),
278
  None,
@@ -413,20 +413,23 @@ def process_search_results(keyword, korean_only, apply_main_keyword, exclude_zer
413
 
414
  table_html, cat_choices, vol_choices, df, selected_cat, excel, keyword_section_vis, cat_section_vis, new_keyword_state = result
415
 
416
- if excel is not None:
 
417
  empty_placeholder_vis = False
418
  keyword_section_visibility = True
419
  execution_section_visibility = True
 
420
  else:
421
  empty_placeholder_vis = True
422
  keyword_section_visibility = False
423
  execution_section_visibility = False
 
424
 
425
  return (
426
  table_html, cat_choices, vol_choices, df, selected_cat, excel,
427
  gr.update(visible=keyword_section_visibility),
428
- gr.update(visible=cat_section_vis),
429
- gr.update(visible=False),
430
  gr.update(visible=empty_placeholder_vis),
431
  gr.update(visible=execution_section_visibility),
432
  new_keyword_state
 
272
  logger.error(f"파일 볡사 였λ₯˜: {file_error}")
273
 
274
  return (
275
+ table_html,
276
  gr.update(choices=cat_choices),
277
  gr.update(choices=vol_choices),
278
  None,
 
413
 
414
  table_html, cat_choices, vol_choices, df, selected_cat, excel, keyword_section_vis, cat_section_vis, new_keyword_state = result
415
 
416
+ # ν…Œμ΄λΈ”μ΄ 있으면 μ„Ήμ…˜λ“€μ„ ν‘œμ‹œ
417
+ if table_html and table_html.get('value') if isinstance(table_html, dict) else table_html:
418
  empty_placeholder_vis = False
419
  keyword_section_visibility = True
420
  execution_section_visibility = True
421
+ logger.info("ν…Œμ΄λΈ” 데이터가 있음 - μ„Ήμ…˜λ“€μ„ ν‘œμ‹œν•©λ‹ˆλ‹€")
422
  else:
423
  empty_placeholder_vis = True
424
  keyword_section_visibility = False
425
  execution_section_visibility = False
426
+ logger.info("ν…Œμ΄λΈ” 데이터가 μ—†μŒ - κΈ°λ³Έ μƒνƒœλ₯Ό μœ μ§€ν•©λ‹ˆλ‹€")
427
 
428
  return (
429
  table_html, cat_choices, vol_choices, df, selected_cat, excel,
430
  gr.update(visible=keyword_section_visibility),
431
+ gr.update(visible=True), # μΉ΄ν…Œκ³ λ¦¬ 뢄석 μ„Ήμ…˜μ€ 항상 ν‘œμ‹œ
432
+ gr.update(visible=False), # μ§„ν–‰ μƒνƒœλŠ” μˆ¨κΉ€
433
  gr.update(visible=empty_placeholder_vis),
434
  gr.update(visible=execution_section_visibility),
435
  new_keyword_state