Update app.py
Browse files
app.py
CHANGED
|
@@ -262,18 +262,18 @@ class JainArchitectureCore:
|
|
| 262 |
# ์ ์ญ ์ ์ธ ์ธ์คํด์ค ์์ฑ
|
| 263 |
jain_core = JainArchitectureCore()
|
| 264 |
|
| 265 |
-
def chat_with_jain(message: str, history: List[
|
| 266 |
"""
|
| 267 |
์ ์ธ๊ณผ์ ์ฑํ
์ธํฐํ์ด์ค
|
| 268 |
"""
|
| 269 |
if not message.strip():
|
| 270 |
-
return
|
| 271 |
|
| 272 |
# ์ ์ธ์ ์๋ต ์์ฑ
|
| 273 |
jain_response = jain_core.process_thought(message)
|
| 274 |
|
| 275 |
# ํ์คํ ๋ฆฌ ์
๋ฐ์ดํธ
|
| 276 |
-
new_history = history + [
|
| 277 |
|
| 278 |
return "", new_history
|
| 279 |
|
|
@@ -341,7 +341,6 @@ def create_jain_interface():
|
|
| 341 |
with gr.Column(scale=3):
|
| 342 |
# ์ฑํ
์ธํฐํ์ด์ค
|
| 343 |
chatbot = gr.Chatbot(
|
| 344 |
-
type='messages',
|
| 345 |
label="๐ฌ ์ ์ธ๊ณผ์ ๋ํ",
|
| 346 |
height=500,
|
| 347 |
show_label=True,
|
|
|
|
| 262 |
# ์ ์ญ ์ ์ธ ์ธ์คํด์ค ์์ฑ
|
| 263 |
jain_core = JainArchitectureCore()
|
| 264 |
|
| 265 |
+
def chat_with_jain(message: str, history: List[List[str]]) -> Tuple[str, List[List[str]]]:
|
| 266 |
"""
|
| 267 |
์ ์ธ๊ณผ์ ์ฑํ
์ธํฐํ์ด์ค
|
| 268 |
"""
|
| 269 |
if not message.strip():
|
| 270 |
+
return "", history
|
| 271 |
|
| 272 |
# ์ ์ธ์ ์๋ต ์์ฑ
|
| 273 |
jain_response = jain_core.process_thought(message)
|
| 274 |
|
| 275 |
# ํ์คํ ๋ฆฌ ์
๋ฐ์ดํธ
|
| 276 |
+
new_history = history + [[message, jain_response]]
|
| 277 |
|
| 278 |
return "", new_history
|
| 279 |
|
|
|
|
| 341 |
with gr.Column(scale=3):
|
| 342 |
# ์ฑํ
์ธํฐํ์ด์ค
|
| 343 |
chatbot = gr.Chatbot(
|
|
|
|
| 344 |
label="๐ฌ ์ ์ธ๊ณผ์ ๋ํ",
|
| 345 |
height=500,
|
| 346 |
show_label=True,
|