Spaces:
Sleeping
Sleeping
haepa_mac commited on
Commit ยท
f1c813f
1
Parent(s): 91baf11
๐ง Gradio 4.19.2 ์์ ํธํ์ฑ ๋ฐ ๋ชจ๋ ์ค๋ฅ ์์ : - Gradio 4.19.2 ํธํ: type ํ๋ผ๋ฏธํฐ ์ ๊ฑฐ, tuples ํํ ๋ํ - ํ๊ธ ํฐํธ ๋ฌธ์ ํด๊ฒฐ: ์์ด ๋ผ๋ฒจ ์ฌ์ฉ์ผ๋ก ํฐํธ ์ด์ ๋ฐฉ์ง - State ์ด๊ธฐํ ์์ : value ํ๋ผ๋ฏธํฐ๋ก ๋ช ์์ ์ด๊ธฐํ - JSON ์ ๋ก๋ ๊ฐํ: ํ์ผ ๊ฒฝ๋ก ์ฒ๋ฆฌ ๊ฐ์ - ์ฑ๊ฒฉ ํน์ฑ ํ์ ๊ฐ์ : ์์น ์ ๊ฑฐ, ์์ ์์ ํ๋ง ํ์ - ๋ชจ๋ ํธํ์ฑ ๋ฌธ์ ํด๊ฒฐ๋ก ์์ ์ ์ด์ ๋ณด์ฅ
Browse files
app.py
CHANGED
|
@@ -50,29 +50,40 @@ persona_generator = PersonaGenerator()
|
|
| 50 |
def setup_korean_font():
|
| 51 |
"""matplotlib ํ๊ธ ํฐํธ ์ค์ """
|
| 52 |
try:
|
| 53 |
-
# ์ฌ์ฉ ๊ฐ๋ฅํ
|
| 54 |
-
|
| 55 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
|
| 57 |
for font_name in korean_fonts:
|
| 58 |
try:
|
| 59 |
plt.rcParams['font.family'] = font_name
|
| 60 |
-
|
|
|
|
|
|
|
| 61 |
fig, ax = plt.subplots(figsize=(1, 1))
|
| 62 |
-
ax.text(0.5, 0.5, '
|
| 63 |
plt.close(fig)
|
|
|
|
| 64 |
print(f"ํ๊ธ ํฐํธ ์ค์ ์๋ฃ: {font_name}")
|
| 65 |
-
|
| 66 |
-
except:
|
| 67 |
continue
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
|
|
|
| 73 |
except Exception as e:
|
| 74 |
print(f"ํฐํธ ์ค์ ์ค๋ฅ: {str(e)}")
|
| 75 |
plt.rcParams['font.family'] = 'DejaVu Sans'
|
|
|
|
| 76 |
|
| 77 |
# ํฐํธ ์ด๊ธฐ ์ค์
|
| 78 |
setup_korean_font()
|
|
@@ -369,14 +380,14 @@ def plot_humor_matrix(humor_data):
|
|
| 369 |
self_vs_observational = humor_data.get("self_vs_observational", 50)
|
| 370 |
subtle_vs_expressive = humor_data.get("subtle_vs_expressive", 50)
|
| 371 |
|
| 372 |
-
#
|
| 373 |
-
categories = ['
|
| 374 |
values = [warmth_vs_wit, self_vs_observational, subtle_vs_expressive]
|
| 375 |
|
| 376 |
bars = ax.bar(categories, values, color=['#ff9999', '#66b3ff', '#99ff99'])
|
| 377 |
ax.set_ylim(0, 100)
|
| 378 |
-
ax.set_ylabel('
|
| 379 |
-
ax.set_title('
|
| 380 |
|
| 381 |
# ๊ฐ ํ์
|
| 382 |
for bar, value in zip(bars, values):
|
|
@@ -399,7 +410,19 @@ def generate_personality_chart(persona):
|
|
| 399 |
|
| 400 |
try:
|
| 401 |
traits = persona["์ฑ๊ฒฉํน์ฑ"]
|
| 402 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 403 |
values = list(traits.values())
|
| 404 |
|
| 405 |
# ๊ทน์ขํ ์ฐจํธ ์์ฑ
|
|
@@ -415,7 +438,7 @@ def generate_personality_chart(persona):
|
|
| 415 |
ax.set_xticklabels(categories)
|
| 416 |
ax.set_ylim(0, 100)
|
| 417 |
|
| 418 |
-
plt.title("
|
| 419 |
|
| 420 |
return fig
|
| 421 |
except Exception as e:
|
|
@@ -511,27 +534,23 @@ def chat_with_loaded_persona(persona, user_message, chat_history=None):
|
|
| 511 |
try:
|
| 512 |
generator = PersonaGenerator()
|
| 513 |
|
| 514 |
-
# ๋ํ ๊ธฐ๋ก์ ์ฌ๋ฐ๋ฅธ ํํ๋ก ๋ณํ
|
| 515 |
conversation_history = []
|
| 516 |
if chat_history:
|
| 517 |
for message in chat_history:
|
| 518 |
-
if isinstance(message,
|
| 519 |
-
#
|
| 520 |
-
conversation_history.append(message)
|
| 521 |
-
elif isinstance(message, (list, tuple)) and len(message) >= 2:
|
| 522 |
-
# tuple ํํ์ธ ๊ฒฝ์ฐ ๋ณํ
|
| 523 |
conversation_history.append({"role": "user", "content": message[0]})
|
| 524 |
conversation_history.append({"role": "assistant", "content": message[1]})
|
| 525 |
|
| 526 |
# ํ๋ฅด์๋์ ๋ํ
|
| 527 |
response = generator.chat_with_persona(persona, user_message, conversation_history)
|
| 528 |
|
| 529 |
-
# ์๋ก์ด ๋ํ๋ฅผ
|
| 530 |
if chat_history is None:
|
| 531 |
chat_history = []
|
| 532 |
|
| 533 |
-
chat_history.append(
|
| 534 |
-
chat_history.append({"role": "assistant", "content": response})
|
| 535 |
|
| 536 |
return chat_history, ""
|
| 537 |
|
|
@@ -543,8 +562,7 @@ def chat_with_loaded_persona(persona, user_message, chat_history=None):
|
|
| 543 |
if chat_history is None:
|
| 544 |
chat_history = []
|
| 545 |
|
| 546 |
-
chat_history.append(
|
| 547 |
-
chat_history.append({"role": "assistant", "content": error_response})
|
| 548 |
|
| 549 |
return chat_history, ""
|
| 550 |
|
|
@@ -554,44 +572,46 @@ def import_persona_from_json(json_file):
|
|
| 554 |
return None, "JSON ํ์ผ์ ์
๋ก๋ํด์ฃผ์ธ์.", "", {}
|
| 555 |
|
| 556 |
try:
|
| 557 |
-
#
|
| 558 |
-
if
|
| 559 |
-
# ํ์ผ ๊ฐ์ฒด์ธ ๊ฒฝ์ฐ
|
| 560 |
-
with open(json_file.name, 'r', encoding='utf-8') as f:
|
| 561 |
-
persona_data = json.load(f)
|
| 562 |
-
else:
|
| 563 |
# ํ์ผ ๊ฒฝ๋ก์ธ ๊ฒฝ์ฐ
|
| 564 |
-
|
| 565 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 566 |
|
| 567 |
# ํ๋ฅด์๋ ๋ฐ์ดํฐ ๊ฒ์ฆ
|
| 568 |
-
if not isinstance(persona_data, dict)
|
| 569 |
-
return None, "โ ์ฌ๋ฐ๋ฅธ
|
|
|
|
|
|
|
|
|
|
| 570 |
|
| 571 |
# ๊ธฐ๋ณธ ์ ๋ณด ์ถ์ถ
|
| 572 |
-
basic_info = {
|
| 573 |
-
|
| 574 |
-
"์ ํ": persona_data.get("๊ธฐ๋ณธ์ ๋ณด", {}).get("์ ํ", "Unknown"),
|
| 575 |
-
"์ค๋ช
": persona_data.get("๊ธฐ๋ณธ์ ๋ณด", {}).get("์ค๋ช
", "")
|
| 576 |
-
}
|
| 577 |
|
| 578 |
# ๋ก๋๋ ํ๋ฅด์๋ ์ธ์ฌ๋ง
|
| 579 |
-
persona_name = basic_info.get("์ด๋ฆ", "์น๊ตฌ")
|
| 580 |
greeting = f"### ๐ค {persona_name}\n\n์๋
! ๋๋ **{persona_name}**์ด์ผ. JSON์์ ๋ค์ ๊นจ์ด๋ฌ์ด! ๋ํํด๋ณด์~ ๐"
|
| 581 |
|
| 582 |
return (persona_data, f"โ
{persona_name} ํ๋ฅด์๋๋ฅผ JSON์์ ๋ถ๋ฌ์์ต๋๋ค!",
|
| 583 |
greeting, basic_info)
|
| 584 |
|
| 585 |
-
except
|
| 586 |
-
return None, "โ
|
|
|
|
|
|
|
| 587 |
except Exception as e:
|
| 588 |
import traceback
|
| 589 |
-
|
| 590 |
-
print(f"JSON ๋ถ๋ฌ์ค๊ธฐ ์ค๋ฅ: {error_msg}")
|
| 591 |
return None, f"โ JSON ๋ถ๋ฌ์ค๊ธฐ ์ค ์ค๋ฅ ๋ฐ์: {str(e)}", "", {}
|
| 592 |
|
| 593 |
def format_personality_traits(persona):
|
| 594 |
-
"""์ฑ๊ฒฉ ํน์ฑ์ ์ฌ์ฉ์ ์นํ์ ์ธ ํํ๋ก ํฌ๋งท"""
|
| 595 |
if not persona or "์ฑ๊ฒฉํน์ฑ" not in persona:
|
| 596 |
return "ํ๋ฅด์๋๊ฐ ์์ฑ๋์ง ์์์ต๋๋ค."
|
| 597 |
|
|
@@ -601,8 +621,7 @@ def format_personality_traits(persona):
|
|
| 601 |
|
| 602 |
result = "### ๐ ์ฑ๊ฒฉ ํน์ฑ\n\n"
|
| 603 |
for trait, description in descriptions.items():
|
| 604 |
-
|
| 605 |
-
result += f"**{trait}** ({score}/100)\n{description}\n\n"
|
| 606 |
|
| 607 |
return result
|
| 608 |
|
|
@@ -672,9 +691,9 @@ def create_main_interface():
|
|
| 672 |
}
|
| 673 |
"""
|
| 674 |
|
| 675 |
-
# State ๋ณ์๋ค - ์ฌ๋ฐ๋ฅธ ๋ฐฉ์์ผ๋ก ์์ฑ (
|
| 676 |
-
current_persona = gr.State()
|
| 677 |
-
personas_list = gr.State()
|
| 678 |
|
| 679 |
# Gradio ์ฑ ์์ฑ
|
| 680 |
with gr.Blocks(title="๋ํฝ์ฐ(MemoryTag) - ์ฌ๋ฌผ ํ๋ฅด์๋ ์์ฑ๊ธฐ", css=css, theme="soft") as app:
|
|
@@ -827,8 +846,8 @@ def create_main_interface():
|
|
| 827 |
|
| 828 |
with gr.Column(scale=1):
|
| 829 |
gr.Markdown("### ๐ฌ ๋ํ")
|
| 830 |
-
# Gradio 4.
|
| 831 |
-
chatbot = gr.Chatbot(height=400, label="๋ํ"
|
| 832 |
with gr.Row():
|
| 833 |
message_input = gr.Textbox(
|
| 834 |
placeholder="๋ฉ์์ง๋ฅผ ์
๋ ฅํ์ธ์...",
|
|
|
|
| 50 |
def setup_korean_font():
|
| 51 |
"""matplotlib ํ๊ธ ํฐํธ ์ค์ """
|
| 52 |
try:
|
| 53 |
+
# Hugging Face Spaces ํ๊ฒฝ์์ ์ฌ์ฉ ๊ฐ๋ฅํ ํฐํธ ์ฐพ๊ธฐ
|
| 54 |
+
import subprocess
|
| 55 |
+
import os
|
| 56 |
+
|
| 57 |
+
# ์์คํ
์์ ์ฌ์ฉ ๊ฐ๋ฅํ ํ๊ธ ํฐํธ ์ฐพ๊ธฐ
|
| 58 |
+
korean_fonts = [
|
| 59 |
+
'Noto Sans CJK KR', 'Noto Sans KR', 'NanumGothic', 'NanumBarunGothic',
|
| 60 |
+
'Malgun Gothic', 'AppleGothic', 'DejaVu Sans', 'Liberation Sans'
|
| 61 |
+
]
|
| 62 |
|
| 63 |
for font_name in korean_fonts:
|
| 64 |
try:
|
| 65 |
plt.rcParams['font.family'] = font_name
|
| 66 |
+
plt.rcParams['axes.unicode_minus'] = False
|
| 67 |
+
|
| 68 |
+
# ๊ฐ๋จํ ํ
์คํธ
|
| 69 |
fig, ax = plt.subplots(figsize=(1, 1))
|
| 70 |
+
ax.text(0.5, 0.5, 'ํ
์คํธ', fontsize=8)
|
| 71 |
plt.close(fig)
|
| 72 |
+
|
| 73 |
print(f"ํ๊ธ ํฐํธ ์ค์ ์๋ฃ: {font_name}")
|
| 74 |
+
return
|
| 75 |
+
except Exception as e:
|
| 76 |
continue
|
| 77 |
+
|
| 78 |
+
# ๋ชจ๋ ํฐํธ๊ฐ ์คํจํ ๊ฒฝ์ฐ ๊ธฐ๋ณธ ์ค์ ์ผ๋ก ๋์ฒด
|
| 79 |
+
plt.rcParams['font.family'] = 'DejaVu Sans'
|
| 80 |
+
plt.rcParams['axes.unicode_minus'] = False
|
| 81 |
+
print("ํ๊ธ ํฐํธ๋ฅผ ์ฐพ์ง ๋ชปํด DejaVu Sans ์ฌ์ฉ (ํ๊ธ ํ์ ์ ํ)")
|
| 82 |
+
|
| 83 |
except Exception as e:
|
| 84 |
print(f"ํฐํธ ์ค์ ์ค๋ฅ: {str(e)}")
|
| 85 |
plt.rcParams['font.family'] = 'DejaVu Sans'
|
| 86 |
+
plt.rcParams['axes.unicode_minus'] = False
|
| 87 |
|
| 88 |
# ํฐํธ ์ด๊ธฐ ์ค์
|
| 89 |
setup_korean_font()
|
|
|
|
| 380 |
self_vs_observational = humor_data.get("self_vs_observational", 50)
|
| 381 |
subtle_vs_expressive = humor_data.get("subtle_vs_expressive", 50)
|
| 382 |
|
| 383 |
+
# ์์ด ๋ผ๋ฒจ ์ฌ์ฉ (ํฐํธ ๋ฌธ์ ํด๊ฒฐ)
|
| 384 |
+
categories = ['Warmth vs Wit', 'Self vs Observational', 'Subtle vs Expressive']
|
| 385 |
values = [warmth_vs_wit, self_vs_observational, subtle_vs_expressive]
|
| 386 |
|
| 387 |
bars = ax.bar(categories, values, color=['#ff9999', '#66b3ff', '#99ff99'])
|
| 388 |
ax.set_ylim(0, 100)
|
| 389 |
+
ax.set_ylabel('Score')
|
| 390 |
+
ax.set_title('Humor Style Matrix')
|
| 391 |
|
| 392 |
# ๊ฐ ํ์
|
| 393 |
for bar, value in zip(bars, values):
|
|
|
|
| 410 |
|
| 411 |
try:
|
| 412 |
traits = persona["์ฑ๊ฒฉํน์ฑ"]
|
| 413 |
+
|
| 414 |
+
# ์์ด ๋ผ๋ฒจ ๋งคํ (ํฐํธ ๋ฌธ์ ํด๊ฒฐ)
|
| 415 |
+
trait_mapping = {
|
| 416 |
+
"์จ๊ธฐ": "Warmth",
|
| 417 |
+
"๋ฅ๋ ฅ": "Competence",
|
| 418 |
+
"์ฐฝ์์ฑ": "Creativity",
|
| 419 |
+
"์ธํฅ์ฑ": "Extraversion",
|
| 420 |
+
"์ ๋จธ๊ฐ๊ฐ": "Humor",
|
| 421 |
+
"์ ๋ขฐ์ฑ": "Reliability",
|
| 422 |
+
"๊ณต๊ฐ๋ฅ๋ ฅ": "Empathy"
|
| 423 |
+
}
|
| 424 |
+
|
| 425 |
+
categories = [trait_mapping.get(trait, trait) for trait in traits.keys()]
|
| 426 |
values = list(traits.values())
|
| 427 |
|
| 428 |
# ๊ทน์ขํ ์ฐจํธ ์์ฑ
|
|
|
|
| 438 |
ax.set_xticklabels(categories)
|
| 439 |
ax.set_ylim(0, 100)
|
| 440 |
|
| 441 |
+
plt.title("Personality Traits", size=16, pad=20)
|
| 442 |
|
| 443 |
return fig
|
| 444 |
except Exception as e:
|
|
|
|
| 534 |
try:
|
| 535 |
generator = PersonaGenerator()
|
| 536 |
|
| 537 |
+
# ๋ํ ๊ธฐ๋ก์ ์ฌ๋ฐ๋ฅธ ํํ๋ก ๋ณํ (tuples ํํ ์ฌ์ฉ)
|
| 538 |
conversation_history = []
|
| 539 |
if chat_history:
|
| 540 |
for message in chat_history:
|
| 541 |
+
if isinstance(message, (list, tuple)) and len(message) >= 2:
|
| 542 |
+
# tuple ํํ: [user_message, bot_response]
|
|
|
|
|
|
|
|
|
|
| 543 |
conversation_history.append({"role": "user", "content": message[0]})
|
| 544 |
conversation_history.append({"role": "assistant", "content": message[1]})
|
| 545 |
|
| 546 |
# ํ๋ฅด์๋์ ๋ํ
|
| 547 |
response = generator.chat_with_persona(persona, user_message, conversation_history)
|
| 548 |
|
| 549 |
+
# ์๋ก์ด ๋ํ๋ฅผ tuples ํํ๋ก ์ถ๊ฐ
|
| 550 |
if chat_history is None:
|
| 551 |
chat_history = []
|
| 552 |
|
| 553 |
+
chat_history.append([user_message, response])
|
|
|
|
| 554 |
|
| 555 |
return chat_history, ""
|
| 556 |
|
|
|
|
| 562 |
if chat_history is None:
|
| 563 |
chat_history = []
|
| 564 |
|
| 565 |
+
chat_history.append([user_message, error_response])
|
|
|
|
| 566 |
|
| 567 |
return chat_history, ""
|
| 568 |
|
|
|
|
| 572 |
return None, "JSON ํ์ผ์ ์
๋ก๋ํด์ฃผ์ธ์.", "", {}
|
| 573 |
|
| 574 |
try:
|
| 575 |
+
# ํ์ผ ๊ฒฝ๋ก ํ์ธ ๋ฐ ์ฝ๊ธฐ
|
| 576 |
+
if isinstance(json_file, str):
|
|
|
|
|
|
|
|
|
|
|
|
|
| 577 |
# ํ์ผ ๊ฒฝ๋ก์ธ ๊ฒฝ์ฐ
|
| 578 |
+
file_path = json_file
|
| 579 |
+
else:
|
| 580 |
+
# ํ์ผ ๊ฐ์ฒด์ธ ๊ฒฝ์ฐ (Gradio ์
๋ก๋)
|
| 581 |
+
file_path = json_file.name if hasattr(json_file, 'name') else str(json_file)
|
| 582 |
+
|
| 583 |
+
# JSON ํ์ผ ์ฝ๊ธฐ
|
| 584 |
+
with open(file_path, 'r', encoding='utf-8') as f:
|
| 585 |
+
persona_data = json.load(f)
|
| 586 |
|
| 587 |
# ํ๋ฅด์๋ ๋ฐ์ดํฐ ๊ฒ์ฆ
|
| 588 |
+
if not isinstance(persona_data, dict):
|
| 589 |
+
return None, "โ ์ฌ๋ฐ๋ฅธ JSON ํ์์ด ์๋๋๋ค.", "", {}
|
| 590 |
+
|
| 591 |
+
if "๊ธฐ๋ณธ์ ๋ณด" not in persona_data:
|
| 592 |
+
return None, "โ ์ฌ๋ฐ๋ฅธ ํ๋ฅด์๋ JSON ํ์ผ์ด ์๋๋๋ค. '๊ธฐ๋ณธ์ ๋ณด' ํค๊ฐ ํ์ํฉ๋๋ค.", "", {}
|
| 593 |
|
| 594 |
# ๊ธฐ๋ณธ ์ ๋ณด ์ถ์ถ
|
| 595 |
+
basic_info = persona_data.get("๊ธฐ๋ณธ์ ๋ณด", {})
|
| 596 |
+
persona_name = basic_info.get("์ด๋ฆ", "Unknown")
|
|
|
|
|
|
|
|
|
|
| 597 |
|
| 598 |
# ๋ก๋๋ ํ๋ฅด์๋ ์ธ์ฌ๋ง
|
|
|
|
| 599 |
greeting = f"### ๐ค {persona_name}\n\n์๋
! ๋๋ **{persona_name}**์ด์ผ. JSON์์ ๋ค์ ๊นจ์ด๋ฌ์ด! ๋ํํด๋ณด์~ ๐"
|
| 600 |
|
| 601 |
return (persona_data, f"โ
{persona_name} ํ๋ฅด์๋๋ฅผ JSON์์ ๋ถ๋ฌ์์ต๋๋ค!",
|
| 602 |
greeting, basic_info)
|
| 603 |
|
| 604 |
+
except FileNotFoundError:
|
| 605 |
+
return None, "โ ํ์ผ์ ์ฐพ์ ์ ์์ต๋๋ค.", "", {}
|
| 606 |
+
except json.JSONDecodeError as e:
|
| 607 |
+
return None, f"โ JSON ํ์ผ ํ์์ด ์ฌ๋ฐ๋ฅด์ง ์์ต๋๋ค: {str(e)}", "", {}
|
| 608 |
except Exception as e:
|
| 609 |
import traceback
|
| 610 |
+
traceback.print_exc()
|
|
|
|
| 611 |
return None, f"โ JSON ๋ถ๋ฌ์ค๊ธฐ ์ค ์ค๋ฅ ๋ฐ์: {str(e)}", "", {}
|
| 612 |
|
| 613 |
def format_personality_traits(persona):
|
| 614 |
+
"""์ฑ๊ฒฉ ํน์ฑ์ ์ฌ์ฉ์ ์นํ์ ์ธ ํํ๋ก ํฌ๋งท (์์น ์์ด ์์ ํ๋ง)"""
|
| 615 |
if not persona or "์ฑ๊ฒฉํน์ฑ" not in persona:
|
| 616 |
return "ํ๋ฅด์๋๊ฐ ์์ฑ๋์ง ์์์ต๋๋ค."
|
| 617 |
|
|
|
|
| 621 |
|
| 622 |
result = "### ๐ ์ฑ๊ฒฉ ํน์ฑ\n\n"
|
| 623 |
for trait, description in descriptions.items():
|
| 624 |
+
result += f"**{trait}**: {description}\n\n"
|
|
|
|
| 625 |
|
| 626 |
return result
|
| 627 |
|
|
|
|
| 691 |
}
|
| 692 |
"""
|
| 693 |
|
| 694 |
+
# State ๋ณ์๋ค - ์ฌ๋ฐ๋ฅธ ๋ฐฉ์์ผ๋ก ์์ฑ (๊ธฐ๋ณธ๊ฐ ์์ด)
|
| 695 |
+
current_persona = gr.State(value=None)
|
| 696 |
+
personas_list = gr.State(value=[])
|
| 697 |
|
| 698 |
# Gradio ์ฑ ์์ฑ
|
| 699 |
with gr.Blocks(title="๋ํฝ์ฐ(MemoryTag) - ์ฌ๋ฌผ ํ๋ฅด์๋ ์์ฑ๊ธฐ", css=css, theme="soft") as app:
|
|
|
|
| 846 |
|
| 847 |
with gr.Column(scale=1):
|
| 848 |
gr.Markdown("### ๐ฌ ๋ํ")
|
| 849 |
+
# Gradio 4.19.2 ํธํ์ ์ํด type ํ๋ผ๋ฏธํฐ ์ ๊ฑฐ
|
| 850 |
+
chatbot = gr.Chatbot(height=400, label="๋ํ")
|
| 851 |
with gr.Row():
|
| 852 |
message_input = gr.Textbox(
|
| 853 |
placeholder="๋ฉ์์ง๋ฅผ ์
๋ ฅํ์ธ์...",
|