Spaces:
Sleeping
Sleeping
Jeong-hun Kim
commited on
Commit
Β·
54c8c61
1
Parent(s):
151bab0
debug fix
Browse files- core/launch_gradio.py +5 -5
core/launch_gradio.py
CHANGED
@@ -31,19 +31,19 @@ def create_interface(ctx: ContextManager, makePipeline: MakePipeline):
|
|
31 |
return gr.update(value=html)
|
32 |
|
33 |
def on_submit(user_msg: str, ctx: ContextManager):
|
34 |
-
# μ¬μ©μ
|
35 |
ctx.addHistory("user", user_msg)
|
36 |
|
37 |
-
#
|
38 |
html = render_chat(ctx)
|
39 |
-
yield html, "", ctx
|
40 |
|
41 |
# λ΄ μλ΅ μμ±
|
42 |
generate_reply(ctx, makePipeline, user_msg)
|
43 |
|
44 |
-
#
|
45 |
html = render_chat(ctx)
|
46 |
-
yield html, "", ctx
|
47 |
|
48 |
# history μ΄κΈ°ν
|
49 |
def reset_chat():
|
|
|
31 |
return gr.update(value=html)
|
32 |
|
33 |
def on_submit(user_msg: str, ctx: ContextManager):
|
34 |
+
# μ¬μ©μ μ
λ ₯ historyμ μΆκ°
|
35 |
ctx.addHistory("user", user_msg)
|
36 |
|
37 |
+
# μ¬μ©μ μ
λ ₯μ ν¬ν¨ν μ±ν
μ°μ λ λλ§
|
38 |
html = render_chat(ctx)
|
39 |
+
yield html, "", ctx
|
40 |
|
41 |
# λ΄ μλ΅ μμ±
|
42 |
generate_reply(ctx, makePipeline, user_msg)
|
43 |
|
44 |
+
# μλ΅μ ν¬ν¨ν μ 체 history κΈ°λ° λ λλ§
|
45 |
html = render_chat(ctx)
|
46 |
+
yield html, "", ctx
|
47 |
|
48 |
# history μ΄κΈ°ν
|
49 |
def reset_chat():
|