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