Spaces:
Running
Running
Commit
·
31c4099
1
Parent(s):
b4882b6
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,7 +14,7 @@ client = Client(
|
|
| 14 |
EOS_STRING = '</s>'
|
| 15 |
EOT_STRING = '<EOT>'
|
| 16 |
|
| 17 |
-
def get_prompt(
|
| 18 |
texts = [f"<s>[INST] <<SYS>>\n{system_prompt}\n<</SYS>>\n\n"]
|
| 19 |
|
| 20 |
do_strip = False
|
|
@@ -103,12 +103,12 @@ with gr.Blocks(theme='Taithrah/Minimal') as demo:
|
|
| 103 |
|
| 104 |
|
| 105 |
with gr.Group():
|
| 106 |
-
chatbot = gr.Chatbot(label='
|
| 107 |
with gr.Row():
|
| 108 |
textbox = gr.Textbox(
|
| 109 |
container=False,
|
| 110 |
show_label=False,
|
| 111 |
-
placeholder='Hi,
|
| 112 |
scale=10
|
| 113 |
)
|
| 114 |
submit_button = gr.Button('Submit', variant='primary', scale=1, min_width=0)
|
|
|
|
| 14 |
EOS_STRING = '</s>'
|
| 15 |
EOT_STRING = '<EOT>'
|
| 16 |
|
| 17 |
+
def get_prompt(message, chat_history, system_prompt):
|
| 18 |
texts = [f"<s>[INST] <<SYS>>\n{system_prompt}\n<</SYS>>\n\n"]
|
| 19 |
|
| 20 |
do_strip = False
|
|
|
|
| 103 |
|
| 104 |
|
| 105 |
with gr.Group():
|
| 106 |
+
chatbot = gr.Chatbot(label='Yi-6B')
|
| 107 |
with gr.Row():
|
| 108 |
textbox = gr.Textbox(
|
| 109 |
container=False,
|
| 110 |
show_label=False,
|
| 111 |
+
placeholder='Hi, Yi',
|
| 112 |
scale=10
|
| 113 |
)
|
| 114 |
submit_button = gr.Button('Submit', variant='primary', scale=1, min_width=0)
|