Update app.py
Browse files
app.py
CHANGED
@@ -276,7 +276,7 @@ def wrapper_modified(keyword, korean_only, apply_main_keyword_option, exclude_ze
|
|
276 |
gr.update(choices=cat_choices),
|
277 |
gr.update(choices=vol_choices),
|
278 |
None,
|
279 |
-
gr.update(choices=cat_choices, value=selected_cat),
|
280 |
local_file,
|
281 |
gr.update(visible=True),
|
282 |
gr.update(visible=True),
|
@@ -360,19 +360,10 @@ def filter_and_sort_table(df, selected_cat, keyword_sort, total_volume_sort, usa
|
|
360 |
def update_category_selection(selected_cat, session_id):
|
361 |
"""์นดํ
๊ณ ๋ฆฌ ํํฐ ์ ํ ์ ๋ถ์ํ ์นดํ
๊ณ ๋ฆฌ๋ ๊ฐ์ ๊ฐ์ผ๋ก ์
๋ฐ์ดํธ"""
|
362 |
update_session_activity(session_id)
|
|
|
363 |
|
364 |
-
|
365 |
-
|
366 |
-
result = client.predict(
|
367 |
-
selected_cat=selected_cat,
|
368 |
-
api_name="/update_category_selection"
|
369 |
-
)
|
370 |
-
|
371 |
-
return gr.update(value=result)
|
372 |
-
|
373 |
-
except Exception as e:
|
374 |
-
logger.error(f"์นดํ
๊ณ ๋ฆฌ ์ ํ API ํธ์ถ ์ค๋ฅ: {e}")
|
375 |
-
return gr.update(value=selected_cat)
|
376 |
|
377 |
def reset_interface(session_id):
|
378 |
"""์ธํฐํ์ด์ค ๋ฆฌ์
ํจ์ - ์ธ์
๋ณ ๋ฐ์ดํฐ ์ด๊ธฐํ"""
|
|
|
276 |
gr.update(choices=cat_choices),
|
277 |
gr.update(choices=vol_choices),
|
278 |
None,
|
279 |
+
gr.update(choices=cat_choices, value=selected_cat), # ๋ถ์์ฉ ์นดํ
๊ณ ๋ฆฌ๋ ๊ฐ์ ์ ํ์ง๋ก ์
๋ฐ์ดํธ
|
280 |
local_file,
|
281 |
gr.update(visible=True),
|
282 |
gr.update(visible=True),
|
|
|
360 |
def update_category_selection(selected_cat, session_id):
|
361 |
"""์นดํ
๊ณ ๋ฆฌ ํํฐ ์ ํ ์ ๋ถ์ํ ์นดํ
๊ณ ๋ฆฌ๋ ๊ฐ์ ๊ฐ์ผ๋ก ์
๋ฐ์ดํธ"""
|
362 |
update_session_activity(session_id)
|
363 |
+
logger.info(f"์นดํ
๊ณ ๋ฆฌ ์ ํ ๋ณ๊ฒฝ: {selected_cat}")
|
364 |
|
365 |
+
# ๋ก์ปฌ์์ ์ง์ ์ฒ๋ฆฌ (API ํธ์ถ ์์ด)
|
366 |
+
return gr.update(value=selected_cat)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
367 |
|
368 |
def reset_interface(session_id):
|
369 |
"""์ธํฐํ์ด์ค ๋ฆฌ์
ํจ์ - ์ธ์
๋ณ ๋ฐ์ดํฐ ์ด๊ธฐํ"""
|