Spaces:
Building
Building
Update app.py
Browse files
app.py
CHANGED
@@ -34,7 +34,6 @@ KOREAN_COMPANIES = [
|
|
34 |
"investing"
|
35 |
]
|
36 |
|
37 |
-
|
38 |
#########################################################
|
39 |
# κ³΅ν΅ ν¨μ
|
40 |
#########################################################
|
@@ -129,6 +128,7 @@ def load_from_db(keyword, country):
|
|
129 |
return json.loads(result[0]), convert_to_seoul_time(result[1])
|
130 |
return None, None
|
131 |
|
|
|
132 |
#########################################################
|
133 |
# "id"λ‘ μ§μ λ‘λ©νκΈ° (νμ€ν 리μμ μ¬μ©)
|
134 |
#########################################################
|
@@ -168,6 +168,10 @@ def display_results(articles):
|
|
168 |
# (1) κ²μ μ => κΈ°μ¬ + λΆμ λμ μΆλ ₯, DB μ μ₯
|
169 |
#########################################################
|
170 |
def search_company(company):
|
|
|
|
|
|
|
|
|
171 |
error_message, articles = serphouse_search(company, "United States")
|
172 |
if not error_message and articles:
|
173 |
analysis = analyze_sentiment_batch(articles, client)
|
@@ -185,6 +189,9 @@ def search_company(company):
|
|
185 |
# (2) μΆλ ₯ μ => DBμ μ μ₯λ κΈ°μ¬ + λΆμ ν¨κ» μΆλ ₯
|
186 |
#########################################################
|
187 |
def load_company(company):
|
|
|
|
|
|
|
188 |
data, timestamp = load_from_db(company, "United States")
|
189 |
if data:
|
190 |
articles = data.get("articles", [])
|
@@ -252,7 +259,6 @@ def show_stats():
|
|
252 |
|
253 |
return output
|
254 |
|
255 |
-
|
256 |
#########################################################
|
257 |
# μ 체 κ²μ (λ³λ ¬) / μ 체 μΆλ ₯ / μ 체 리ν¬νΈ
|
258 |
#########################################################
|
@@ -262,6 +268,7 @@ def search_all_companies():
|
|
262 |
def do_search(comp):
|
263 |
return comp, search_company(comp)
|
264 |
|
|
|
265 |
with ThreadPoolExecutor(max_workers=5) as executor:
|
266 |
futures = [executor.submit(do_search, c) for c in KOREAN_COMPANIES]
|
267 |
for future in as_completed(futures):
|
@@ -345,7 +352,6 @@ def get_custom_search_history():
|
|
345 |
(id, timestamp, keyword, country) ννλ‘ λ°ν
|
346 |
μ΅μ μ μ λ ¬
|
347 |
"""
|
348 |
-
# setμΌλ‘ λ§λ€μ΄μ λΉ λ₯΄κ² κ²μ
|
349 |
company_set = set(k.lower() for k in KOREAN_COMPANIES)
|
350 |
|
351 |
conn = sqlite3.connect("search_results.db")
|
@@ -360,9 +366,6 @@ def get_custom_search_history():
|
|
360 |
for (sid, kw, cty, ts) in rows:
|
361 |
# KOREAN_COMPANIES μ μλ κ²½μ° -> μ¬μ©μ μμ κ²μ
|
362 |
if kw.lower() not in company_set:
|
363 |
-
# "id, μκ°, ν€μλ(κ΅κ°)" λ‘ νμν ν
μ€νΈ ꡬμ±
|
364 |
-
# μ: "12 | 2025-01-22 10:23:00 KST | Apple (United States)"
|
365 |
-
# μ€μ dropdown value λ sid (id) λ§ μ μ₯
|
366 |
display_time = convert_to_seoul_time(ts)
|
367 |
label = f"{sid} | {display_time} | {kw} ({cty})"
|
368 |
history_list.append((str(sid), label))
|
@@ -384,7 +387,7 @@ def view_history_record(record_id):
|
|
384 |
keyword = data["keyword"]
|
385 |
country = data["country"]
|
386 |
timestamp = data["timestamp"]
|
387 |
-
stored = data["data"]
|
388 |
|
389 |
articles = stored.get("articles", [])
|
390 |
analysis = stored.get("analysis", "")
|
@@ -401,46 +404,12 @@ def view_history_record(record_id):
|
|
401 |
|
402 |
|
403 |
#########################################################
|
404 |
-
# SerpHouse API
|
405 |
#########################################################
|
406 |
-
def
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
def translate_query(query, country):
|
411 |
-
try:
|
412 |
-
if is_english(query):
|
413 |
-
return query
|
414 |
-
|
415 |
-
if country in COUNTRY_LANGUAGES:
|
416 |
-
if country == "South Korea":
|
417 |
-
return query
|
418 |
-
target_lang = COUNTRY_LANGUAGES[country]
|
419 |
-
|
420 |
-
url = "https://translate.googleapis.com/translate_a/single"
|
421 |
-
params = {
|
422 |
-
"client": "gtx",
|
423 |
-
"sl": "auto",
|
424 |
-
"tl": target_lang,
|
425 |
-
"dt": "t",
|
426 |
-
"q": query
|
427 |
-
}
|
428 |
-
|
429 |
-
session = requests.Session()
|
430 |
-
retries = Retry(total=3, backoff_factor=0.5)
|
431 |
-
session.mount('https://', HTTPAdapter(max_retries=retries))
|
432 |
-
|
433 |
-
response = session.get(url, params=params, timeout=(5, 10))
|
434 |
-
translated_text = response.json()[0][0][0]
|
435 |
-
return translated_text
|
436 |
-
|
437 |
-
return query
|
438 |
-
|
439 |
-
except Exception as e:
|
440 |
-
print(f"λ²μ μ€λ₯: {str(e)}")
|
441 |
-
return query
|
442 |
-
|
443 |
-
def search_serphouse(query, country, page=1, num_result=10):
|
444 |
url = "https://api.serphouse.com/serp/live"
|
445 |
|
446 |
now = datetime.utcnow()
|
@@ -492,23 +461,20 @@ def search_serphouse(query, country, page=1, num_result=10):
|
|
492 |
)
|
493 |
|
494 |
response.raise_for_status()
|
495 |
-
|
|
|
|
|
|
|
|
|
|
|
496 |
|
497 |
except requests.exceptions.Timeout:
|
498 |
-
return
|
499 |
-
"error": "κ²μ μκ°μ΄ μ΄κ³Όλμμ΅λλ€. μ μ ν λ€μ μλν΄μ£ΌμΈμ.",
|
500 |
-
"translated_query": query
|
501 |
-
}
|
502 |
except requests.exceptions.RequestException as e:
|
503 |
-
return {
|
504 |
-
"error": f"κ²μ μ€ μ€λ₯κ° λ°μνμ΅λλ€: {str(e)}",
|
505 |
-
"translated_query": query
|
506 |
-
}
|
507 |
except Exception as e:
|
508 |
-
return {
|
509 |
-
|
510 |
-
"translated_query": query
|
511 |
-
}
|
512 |
|
513 |
def format_results_from_raw(response_data):
|
514 |
if "error" in response_data:
|
@@ -697,14 +663,14 @@ COUNTRY_LOCATIONS = {
|
|
697 |
"Bangladesh": "Bangladesh",
|
698 |
"Pakistan": "Pakistan",
|
699 |
"Egypt": "Egypt",
|
700 |
-
"Morocco": "
|
701 |
-
"Nigeria": "
|
702 |
-
"Kenya": "
|
703 |
-
"Ukraine": "
|
704 |
-
"Croatia": "
|
705 |
-
"Slovakia": "
|
706 |
-
"Bulgaria": "
|
707 |
-
"Serbia": "
|
708 |
"Estonia": "et",
|
709 |
"Latvia": "lv",
|
710 |
"Lithuania": "lt",
|
@@ -897,7 +863,7 @@ with gr.Blocks(theme="Yntec/HaleyCH_Theme_Orange", css=css, title="NewsAI μλΉ
|
|
897 |
|
898 |
with gr.Tabs():
|
899 |
# 첫 λ²μ§Έ ν
|
900 |
-
with gr.Tab("
|
901 |
gr.Markdown("## EarnBot: κΈλ‘λ² λΉ
ν
ν¬ κΈ°μ
λ° ν¬μ μ λ§ AI μλ λΆμ")
|
902 |
gr.Markdown(" - 'μ 체 λΆμ λ³΄κ³ μμ½' ν΄λ¦ μ μ 체 μλ λ³΄κ³ μμ±.\n - μλ κ°λ³ μ’
λͺ©μ 'κ²μ(DB μλ μ μ₯)'κ³Ό 'μΆλ ₯(DB μλ νΈμΆ)'λ κ°λ₯.\n - νλ¨ 'μλ κ²μ νμ€ν 리'μμ μ΄μ μ μλ μ
λ ₯ν κ²μμ΄ κΈ°λ‘ νμΈ κ°λ₯.")
|
903 |
|
@@ -958,7 +924,7 @@ with gr.Blocks(theme="Yntec/HaleyCH_Theme_Orange", css=css, title="NewsAI μλΉ
|
|
958 |
outputs=result_display
|
959 |
)
|
960 |
|
961 |
-
# (μΆκ°) μλ κ²μ νμ€ν 리
|
962 |
gr.Markdown("---")
|
963 |
gr.Markdown("### μλ κ²μ νμ€ν 리")
|
964 |
with gr.Row():
|
@@ -966,27 +932,14 @@ with gr.Blocks(theme="Yntec/HaleyCH_Theme_Orange", css=css, title="NewsAI μλΉ
|
|
966 |
|
967 |
history_dropdown = gr.Dropdown(
|
968 |
label="κ²μ κΈ°λ‘ λͺ©λ‘",
|
969 |
-
choices=[],
|
970 |
value=None
|
971 |
)
|
972 |
hist_view_btn = gr.Button("보기", variant="primary")
|
973 |
hist_result_display = gr.Markdown()
|
974 |
|
975 |
-
# 1) νμ€ν 리 κ°±μ ν¨μ
|
976 |
def update_history_dropdown():
|
977 |
-
history_list = get_custom_search_history()
|
978 |
-
labels = [lbl for (id_val, lbl) in history_list]
|
979 |
-
values = [id_val for (id_val, lbl) in history_list]
|
980 |
-
|
981 |
-
# gr.Dropdown μ choices=[..., ...] ννλ‘ μ λ¬ν΄μΌ νλ―λ‘
|
982 |
-
# zip νμ¬ (value, label) μμ λ§λ¦
|
983 |
-
# Gradio 3.xμμλ choicesλ₯Ό listλ‘ μ£Όκ³ , label/value λΆλ¦¬ λΆκ°.
|
984 |
-
# -> workaround: "value|label" μ or just store label in "choices" and store value separate
|
985 |
-
# μ¬κΈ°μλ choices μ labelλ§ λ£κ³ , idλ label νμ± λ± ν΄μΌν¨.
|
986 |
-
# μ’ λ νΈνκ²: return a dictionary for "choices"
|
987 |
-
|
988 |
-
# λ°©λ²1) labelλ§ μ λ¬ -> user picks label -> then parse.
|
989 |
-
# κ°λ¨ν "value=label"μ΄ λλλ‘:
|
990 |
choice_list = []
|
991 |
for (id_val, label) in history_list:
|
992 |
choice_list.append(label)
|
@@ -998,19 +951,13 @@ with gr.Blocks(theme="Yntec/HaleyCH_Theme_Orange", css=css, title="NewsAI μλΉ
|
|
998 |
outputs=history_dropdown
|
999 |
)
|
1000 |
|
1001 |
-
# 2) νμ€ν 리 보기 ν¨μ
|
1002 |
def show_history_record(selected_label):
|
1003 |
-
# selected_label μ΄ "id | time | keyword (country)" νμ
|
1004 |
if not selected_label:
|
1005 |
return "νμ€ν λ¦¬κ° μ νλμ§ μμμ΅λλ€."
|
1006 |
-
|
1007 |
-
# idλ κ°μ₯ μλΆλΆμ μ«μ
|
1008 |
-
# μ: "12 | 2025-01-22 10:23:00 KST | Apple (United States)"
|
1009 |
-
# -> id=12
|
1010 |
splitted = selected_label.split("|")
|
1011 |
if len(splitted) < 2:
|
1012 |
return "νμ μ€λ₯"
|
1013 |
-
record_id = splitted[0].strip()
|
1014 |
return view_history_record(record_id)
|
1015 |
|
1016 |
hist_view_btn.click(
|
@@ -1019,11 +966,10 @@ with gr.Blocks(theme="Yntec/HaleyCH_Theme_Orange", css=css, title="NewsAI μλΉ
|
|
1019 |
outputs=hist_result_display
|
1020 |
)
|
1021 |
|
1022 |
-
|
1023 |
-
|
1024 |
-
with gr.Tab("μ§μ μλ κ²μ/λΆμ"):
|
1025 |
gr.Markdown("## μ¬μ©μ μμ ν€μλ + κ΅κ° κ²μ/λΆμ")
|
1026 |
-
gr.Markdown("κ²μ κ²°κ³Όκ° DBμ μ μ₯λλ©°,
|
1027 |
|
1028 |
with gr.Row():
|
1029 |
with gr.Column():
|
@@ -1047,6 +993,33 @@ with gr.Blocks(theme="Yntec/HaleyCH_Theme_Orange", css=css, title="NewsAI μλΉ
|
|
1047 |
inputs=[user_input, country_selection],
|
1048 |
outputs=custom_search_output
|
1049 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1050 |
|
1051 |
|
1052 |
iface.launch(
|
|
|
34 |
"investing"
|
35 |
]
|
36 |
|
|
|
37 |
#########################################################
|
38 |
# κ³΅ν΅ ν¨μ
|
39 |
#########################################################
|
|
|
128 |
return json.loads(result[0]), convert_to_seoul_time(result[1])
|
129 |
return None, None
|
130 |
|
131 |
+
|
132 |
#########################################################
|
133 |
# "id"λ‘ μ§μ λ‘λ©νκΈ° (νμ€ν 리μμ μ¬μ©)
|
134 |
#########################################################
|
|
|
168 |
# (1) κ²μ μ => κΈ°μ¬ + λΆμ λμ μΆλ ₯, DB μ μ₯
|
169 |
#########################################################
|
170 |
def search_company(company):
|
171 |
+
"""
|
172 |
+
μ§μ λ KOREAN_COMPANIES κΈ°μ
(λλ ν€μλ)μ λν΄
|
173 |
+
λ―Έκ΅ λ΄μ€ κ²μ -> κ°μ± λΆμ -> DB μ μ₯ -> κΈ°μ¬+λΆμ λ³΄κ³ μΆλ ₯
|
174 |
+
"""
|
175 |
error_message, articles = serphouse_search(company, "United States")
|
176 |
if not error_message and articles:
|
177 |
analysis = analyze_sentiment_batch(articles, client)
|
|
|
189 |
# (2) μΆλ ₯ μ => DBμ μ μ₯λ κΈ°μ¬ + λΆμ ν¨κ» μΆλ ₯
|
190 |
#########################################################
|
191 |
def load_company(company):
|
192 |
+
"""
|
193 |
+
DBμ μ΄λ―Έ μ μ₯λ (κΈ°μ
λͺ
) μ λν κΈ°μ¬+λΆμμ ν¨κ» μΆλ ₯
|
194 |
+
"""
|
195 |
data, timestamp = load_from_db(company, "United States")
|
196 |
if data:
|
197 |
articles = data.get("articles", [])
|
|
|
259 |
|
260 |
return output
|
261 |
|
|
|
262 |
#########################################################
|
263 |
# μ 체 κ²μ (λ³λ ¬) / μ 체 μΆλ ₯ / μ 체 리ν¬νΈ
|
264 |
#########################################################
|
|
|
268 |
def do_search(comp):
|
269 |
return comp, search_company(comp)
|
270 |
|
271 |
+
# λ³λ ¬ μ²λ¦¬
|
272 |
with ThreadPoolExecutor(max_workers=5) as executor:
|
273 |
futures = [executor.submit(do_search, c) for c in KOREAN_COMPANIES]
|
274 |
for future in as_completed(futures):
|
|
|
352 |
(id, timestamp, keyword, country) ννλ‘ λ°ν
|
353 |
μ΅μ μ μ λ ¬
|
354 |
"""
|
|
|
355 |
company_set = set(k.lower() for k in KOREAN_COMPANIES)
|
356 |
|
357 |
conn = sqlite3.connect("search_results.db")
|
|
|
366 |
for (sid, kw, cty, ts) in rows:
|
367 |
# KOREAN_COMPANIES μ μλ κ²½μ° -> μ¬μ©μ μμ κ²μ
|
368 |
if kw.lower() not in company_set:
|
|
|
|
|
|
|
369 |
display_time = convert_to_seoul_time(ts)
|
370 |
label = f"{sid} | {display_time} | {kw} ({cty})"
|
371 |
history_list.append((str(sid), label))
|
|
|
387 |
keyword = data["keyword"]
|
388 |
country = data["country"]
|
389 |
timestamp = data["timestamp"]
|
390 |
+
stored = data["data"]
|
391 |
|
392 |
articles = stored.get("articles", [])
|
393 |
analysis = stored.get("analysis", "")
|
|
|
404 |
|
405 |
|
406 |
#########################################################
|
407 |
+
# SerpHouse API (ν¨μλͺ
μμ ) => serphouse_search
|
408 |
#########################################################
|
409 |
+
def serphouse_search(query, country, page=1, num_result=10):
|
410 |
+
"""
|
411 |
+
SerpHouse API νΈμΆ + κ²°κ³Ό ν¬λ§€ν
|
412 |
+
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
413 |
url = "https://api.serphouse.com/serp/live"
|
414 |
|
415 |
now = datetime.utcnow()
|
|
|
461 |
)
|
462 |
|
463 |
response.raise_for_status()
|
464 |
+
response_data = response.json()
|
465 |
+
|
466 |
+
return format_results_from_raw({
|
467 |
+
"results": response_data,
|
468 |
+
"translated_query": translated_query
|
469 |
+
})
|
470 |
|
471 |
except requests.exceptions.Timeout:
|
472 |
+
return ("κ²μ μκ°μ΄ μ΄κ³Όλμμ΅λλ€. μ μ ν λ€μ μλν΄μ£ΌμΈμ.", [])
|
|
|
|
|
|
|
473 |
except requests.exceptions.RequestException as e:
|
474 |
+
return (f"κ²μ μ€ μ€λ₯κ° λ°μνμ΅λλ€: {str(e)}", [])
|
|
|
|
|
|
|
475 |
except Exception as e:
|
476 |
+
return (f"μκΈ°μΉ μμ μ€λ₯κ° λ°μνμ΅λλ€: {str(e)}", [])
|
477 |
+
|
|
|
|
|
478 |
|
479 |
def format_results_from_raw(response_data):
|
480 |
if "error" in response_data:
|
|
|
663 |
"Bangladesh": "Bangladesh",
|
664 |
"Pakistan": "Pakistan",
|
665 |
"Egypt": "Egypt",
|
666 |
+
"Morocco": "ar",
|
667 |
+
"Nigeria": "en",
|
668 |
+
"Kenya": "sw",
|
669 |
+
"Ukraine": "uk",
|
670 |
+
"Croatia": "hr",
|
671 |
+
"Slovakia": "sk",
|
672 |
+
"Bulgaria": "bg",
|
673 |
+
"Serbia": "sr",
|
674 |
"Estonia": "et",
|
675 |
"Latvia": "lv",
|
676 |
"Lithuania": "lt",
|
|
|
863 |
|
864 |
with gr.Tabs():
|
865 |
# 첫 λ²μ§Έ ν
|
866 |
+
with gr.Tab("μ§μ μλ κ²μ/λΆμ"):
|
867 |
gr.Markdown("## EarnBot: κΈλ‘λ² λΉ
ν
ν¬ κΈ°μ
λ° ν¬μ μ λ§ AI μλ λΆμ")
|
868 |
gr.Markdown(" - 'μ 체 λΆμ λ³΄κ³ μμ½' ν΄λ¦ μ μ 체 μλ λ³΄κ³ μμ±.\n - μλ κ°λ³ μ’
λͺ©μ 'κ²μ(DB μλ μ μ₯)'κ³Ό 'μΆλ ₯(DB μλ νΈμΆ)'λ κ°λ₯.\n - νλ¨ 'μλ κ²μ νμ€ν 리'μμ μ΄μ μ μλ μ
λ ₯ν κ²μμ΄ κΈ°λ‘ νμΈ κ°λ₯.")
|
869 |
|
|
|
924 |
outputs=result_display
|
925 |
)
|
926 |
|
927 |
+
# (μΆκ°) μλ κ²μ νμ€ν 리 (첫 λ²μ§Έ ν)
|
928 |
gr.Markdown("---")
|
929 |
gr.Markdown("### μλ κ²μ νμ€ν 리")
|
930 |
with gr.Row():
|
|
|
932 |
|
933 |
history_dropdown = gr.Dropdown(
|
934 |
label="κ²μ κΈ°λ‘ λͺ©λ‘",
|
935 |
+
choices=[],
|
936 |
value=None
|
937 |
)
|
938 |
hist_view_btn = gr.Button("보기", variant="primary")
|
939 |
hist_result_display = gr.Markdown()
|
940 |
|
|
|
941 |
def update_history_dropdown():
|
942 |
+
history_list = get_custom_search_history()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
943 |
choice_list = []
|
944 |
for (id_val, label) in history_list:
|
945 |
choice_list.append(label)
|
|
|
951 |
outputs=history_dropdown
|
952 |
)
|
953 |
|
|
|
954 |
def show_history_record(selected_label):
|
|
|
955 |
if not selected_label:
|
956 |
return "νμ€ν λ¦¬κ° μ νλμ§ μμμ΅λλ€."
|
|
|
|
|
|
|
|
|
957 |
splitted = selected_label.split("|")
|
958 |
if len(splitted) < 2:
|
959 |
return "νμ μ€λ₯"
|
960 |
+
record_id = splitted[0].strip()
|
961 |
return view_history_record(record_id)
|
962 |
|
963 |
hist_view_btn.click(
|
|
|
966 |
outputs=hist_result_display
|
967 |
)
|
968 |
|
969 |
+
# λ λ²μ§Έ ν: "μλ κ²μ/λΆμ" + νμ€ν 리
|
970 |
+
with gr.Tab("μλ κ²μ/λΆμ"):
|
|
|
971 |
gr.Markdown("## μ¬μ©μ μμ ν€μλ + κ΅κ° κ²μ/λΆμ")
|
972 |
+
gr.Markdown("κ²μ κ²°κ³Όκ° DBμ μ μ₯λλ©°, μλ 'μλ κ²μ νμ€ν 리'μμλ νμΈ κ°λ₯ν©λλ€.")
|
973 |
|
974 |
with gr.Row():
|
975 |
with gr.Column():
|
|
|
993 |
inputs=[user_input, country_selection],
|
994 |
outputs=custom_search_output
|
995 |
)
|
996 |
+
|
997 |
+
# λμΌνκ², λ λ²μ§Έ νμλ νμ€ν 리 μ μ©
|
998 |
+
gr.Markdown("---")
|
999 |
+
gr.Markdown("### μλ κ²μ νμ€ν 리 (λ λ²μ§Έ ν)")
|
1000 |
+
with gr.Row():
|
1001 |
+
refresh_hist_btn2 = gr.Button("νμ€ν 리 κ°±μ ", variant="secondary")
|
1002 |
+
|
1003 |
+
history_dropdown2 = gr.Dropdown(
|
1004 |
+
label="κ²μ κΈ°λ‘ λͺ©λ‘",
|
1005 |
+
choices=[],
|
1006 |
+
value=None
|
1007 |
+
)
|
1008 |
+
hist_view_btn2 = gr.Button("보기", variant="primary")
|
1009 |
+
hist_result_display2 = gr.Markdown()
|
1010 |
+
|
1011 |
+
# λμΌ λ‘μ§ μ¬μ¬μ©
|
1012 |
+
refresh_hist_btn2.click(
|
1013 |
+
fn=update_history_dropdown,
|
1014 |
+
inputs=[],
|
1015 |
+
outputs=history_dropdown2
|
1016 |
+
)
|
1017 |
+
|
1018 |
+
hist_view_btn2.click(
|
1019 |
+
fn=show_history_record,
|
1020 |
+
inputs=[history_dropdown2],
|
1021 |
+
outputs=hist_result_display2
|
1022 |
+
)
|
1023 |
|
1024 |
|
1025 |
iface.launch(
|