Spaces:
Running
on
Zero
Running
on
Zero
cutechicken
commited on
Commit
โข
38f6996
1
Parent(s):
afed118
Update app.py
Browse files
app.py
CHANGED
@@ -526,8 +526,9 @@ body {
|
|
526 |
}
|
527 |
"""
|
528 |
|
529 |
-
|
530 |
-
|
|
|
531 |
with gr.Column():
|
532 |
chatbot = gr.Chatbot(
|
533 |
value=[],
|
@@ -588,6 +589,7 @@ with gr.Blocks(css=CSS) as demo:
|
|
588 |
label="๋ฐ๋ณต ์ต์ ๐"
|
589 |
)
|
590 |
|
|
|
591 |
gr.Examples(
|
592 |
examples=[
|
593 |
["๋ค์ ์ฝ๋์ ๋ฌธ์ ์ ์ ์ฐพ์๋ด๊ณ ๊ฐ์ ๋ ๋ฒ์ ์ ์ ์ํด์ฃผ์ธ์:\ndef fibonacci(n):\n if n <= 1: return n\n return fibonacci(n-1) + fibonacci(n-2)"],
|
@@ -602,6 +604,9 @@ with gr.Blocks(css=CSS) as demo:
|
|
602 |
)
|
603 |
|
604 |
# ์ด๋ฒคํธ ๋ฐ์ธ๋ฉ
|
|
|
|
|
|
|
605 |
msg.submit(
|
606 |
stream_chat,
|
607 |
inputs=[msg, chatbot, file_upload, temperature, max_new_tokens, top_p, top_k, penalty],
|
@@ -614,10 +619,6 @@ with gr.Blocks(css=CSS) as demo:
|
|
614 |
outputs=[msg, chatbot]
|
615 |
)
|
616 |
|
617 |
-
def init_msg():
|
618 |
-
return "ํ์ผ ๋ถ์์ ์์ํฉ๋๋ค..."
|
619 |
-
|
620 |
-
# file_upload.change() ์ด๋ฒคํธ๋ฅผ ์ฌ๊ธฐ๋ก ์ด๋
|
621 |
file_upload.change(
|
622 |
init_msg,
|
623 |
outputs=msg
|
|
|
526 |
}
|
527 |
"""
|
528 |
|
529 |
+
demo = gr.Blocks(css=CSS)
|
530 |
+
|
531 |
+
with demo:
|
532 |
with gr.Column():
|
533 |
chatbot = gr.Chatbot(
|
534 |
value=[],
|
|
|
589 |
label="๋ฐ๋ณต ์ต์ ๐"
|
590 |
)
|
591 |
|
592 |
+
|
593 |
gr.Examples(
|
594 |
examples=[
|
595 |
["๋ค์ ์ฝ๋์ ๋ฌธ์ ์ ์ ์ฐพ์๋ด๊ณ ๊ฐ์ ๋ ๋ฒ์ ์ ์ ์ํด์ฃผ์ธ์:\ndef fibonacci(n):\n if n <= 1: return n\n return fibonacci(n-1) + fibonacci(n-2)"],
|
|
|
604 |
)
|
605 |
|
606 |
# ์ด๋ฒคํธ ๋ฐ์ธ๋ฉ
|
607 |
+
def init_msg():
|
608 |
+
return "ํ์ผ ๋ถ์์ ์์ํฉ๋๋ค..."
|
609 |
+
|
610 |
msg.submit(
|
611 |
stream_chat,
|
612 |
inputs=[msg, chatbot, file_upload, temperature, max_new_tokens, top_p, top_k, penalty],
|
|
|
619 |
outputs=[msg, chatbot]
|
620 |
)
|
621 |
|
|
|
|
|
|
|
|
|
622 |
file_upload.change(
|
623 |
init_msg,
|
624 |
outputs=msg
|