Prompthumanizer commited on
Commit
7a10538
ยท
verified ยท
1 Parent(s): 3bfdca9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -262,18 +262,18 @@ class JainArchitectureCore:
262
  # ์ „์—ญ ์ œ์ธ ์ธ์Šคํ„ด์Šค ์ƒ์„ฑ
263
  jain_core = JainArchitectureCore()
264
 
265
- def chat_with_jain(message: str, history: List[Tuple[str, str]]) -> Tuple[str, List[Tuple[str, str]]]:
266
  """
267
  ์ œ์ธ๊ณผ์˜ ์ฑ„ํŒ… ์ธํ„ฐํŽ˜์ด์Šค
268
  """
269
  if not message.strip():
270
- return history, 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,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,