Spaces:
Sleeping
Sleeping
wenbemi
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,30 +16,7 @@ import pandas as pd
|
|
| 16 |
import json
|
| 17 |
import os
|
| 18 |
import random
|
| 19 |
-
|
| 20 |
-
analyze_emotion,
|
| 21 |
-
detect_intent,
|
| 22 |
-
extract_themes,
|
| 23 |
-
recommend_places_by_theme,
|
| 24 |
-
detect_location_filter,
|
| 25 |
-
generate_intro_message,
|
| 26 |
-
theme_ui_map,
|
| 27 |
-
ui_to_theme_map,
|
| 28 |
-
theme_opening_lines,
|
| 29 |
-
intent_opening_lines,
|
| 30 |
-
apply_weighted_score_filter,
|
| 31 |
-
get_highlight_message,
|
| 32 |
-
get_weather_message,
|
| 33 |
-
get_intent_intro_message,
|
| 34 |
-
recommend_packages,
|
| 35 |
-
handle_selected_place,
|
| 36 |
-
generate_region_intro,
|
| 37 |
-
parse_companion_and_age,
|
| 38 |
-
filter_packages_by_companion_age,
|
| 39 |
-
make_top2_description_custom,
|
| 40 |
-
format_summary_tags_custom,
|
| 41 |
-
make_companion_age_message
|
| 42 |
-
)
|
| 43 |
import streamlit as st
|
| 44 |
from streamlit.components.v1 import html
|
| 45 |
from css import render_message, render_chip_buttons, log_and_render, replay_log
|
|
@@ -101,6 +78,30 @@ if '여행나라' not in travel_df.columns:
|
|
| 101 |
st.error(f"데이터 로딩 후에도 'travel_df'에 '여행나라' 컬럼이 없습니다. 실제 컬럼: {travel_df.columns.tolist()}")
|
| 102 |
st.stop()
|
| 103 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 104 |
# ───────────────────────────────────── streamlit용 함수
|
| 105 |
def init_session():
|
| 106 |
if "chat_log" not in st.session_state:
|
|
|
|
| 16 |
import json
|
| 17 |
import os
|
| 18 |
import random
|
| 19 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
import streamlit as st
|
| 21 |
from streamlit.components.v1 import html
|
| 22 |
from css import render_message, render_chip_buttons, log_and_render, replay_log
|
|
|
|
| 78 |
st.error(f"데이터 로딩 후에도 'travel_df'에 '여행나라' 컬럼이 없습니다. 실제 컬럼: {travel_df.columns.tolist()}")
|
| 79 |
st.stop()
|
| 80 |
|
| 81 |
+
from chat_a import (
|
| 82 |
+
analyze_emotion,
|
| 83 |
+
detect_intent,
|
| 84 |
+
extract_themes,
|
| 85 |
+
recommend_places_by_theme,
|
| 86 |
+
detect_location_filter,
|
| 87 |
+
generate_intro_message,
|
| 88 |
+
theme_ui_map,
|
| 89 |
+
ui_to_theme_map,
|
| 90 |
+
theme_opening_lines,
|
| 91 |
+
intent_opening_lines,
|
| 92 |
+
apply_weighted_score_filter,
|
| 93 |
+
get_highlight_message,
|
| 94 |
+
get_weather_message,
|
| 95 |
+
get_intent_intro_message,
|
| 96 |
+
recommend_packages,
|
| 97 |
+
handle_selected_place,
|
| 98 |
+
generate_region_intro,
|
| 99 |
+
parse_companion_and_age,
|
| 100 |
+
filter_packages_by_companion_age,
|
| 101 |
+
make_top2_description_custom,
|
| 102 |
+
format_summary_tags_custom,
|
| 103 |
+
make_companion_age_message
|
| 104 |
+
)
|
| 105 |
# ───────────────────────────────────── streamlit용 함수
|
| 106 |
def init_session():
|
| 107 |
if "chat_log" not in st.session_state:
|