Spaces:
Sleeping
Sleeping
youzarsiph
commited on
Commit
·
16f4df0
1
Parent(s):
27696a4
update sdk_version
Browse files
README.md
CHANGED
@@ -4,7 +4,7 @@ emoji: 💬
|
|
4 |
colorFrom: blue
|
5 |
colorTo: purple
|
6 |
sdk: gradio
|
7 |
-
sdk_version:
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
license: mit
|
|
|
4 |
colorFrom: blue
|
5 |
colorTo: purple
|
6 |
sdk: gradio
|
7 |
+
sdk_version: 5.0
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
license: mit
|
app.py
CHANGED
@@ -22,12 +22,7 @@ def chat(
|
|
22 |
# Chat history
|
23 |
messages = [{"role": "system", "content": system_message}]
|
24 |
|
25 |
-
|
26 |
-
if val[0]:
|
27 |
-
messages.append({"role": "user", "content": val[0]})
|
28 |
-
|
29 |
-
if val[1]:
|
30 |
-
messages.append({"role": "assistant", "content": val[1]})
|
31 |
|
32 |
# Add user message
|
33 |
messages.append({"role": "user", "content": message})
|
@@ -55,11 +50,13 @@ star_coder = gr.ChatInterface(
|
|
55 |
chat,
|
56 |
title="Star Coder 2",
|
57 |
theme="soft",
|
|
|
58 |
description="Star Coder 2 is a advanced code assistant for software developers, "
|
59 |
"built on top of the BigCode StarCoder 2 15B model.",
|
60 |
additional_inputs=[
|
61 |
gr.Textbox(
|
62 |
-
value="You are a friendly
|
|
|
63 |
label="System message",
|
64 |
),
|
65 |
gr.Slider(
|
|
|
22 |
# Chat history
|
23 |
messages = [{"role": "system", "content": system_message}]
|
24 |
|
25 |
+
messages.extend(history)
|
|
|
|
|
|
|
|
|
|
|
26 |
|
27 |
# Add user message
|
28 |
messages.append({"role": "user", "content": message})
|
|
|
50 |
chat,
|
51 |
title="Star Coder 2",
|
52 |
theme="soft",
|
53 |
+
type="messages",
|
54 |
description="Star Coder 2 is a advanced code assistant for software developers, "
|
55 |
"built on top of the BigCode StarCoder 2 15B model.",
|
56 |
additional_inputs=[
|
57 |
gr.Textbox(
|
58 |
+
value="You are a friendly coding assistant with the knowledge"
|
59 |
+
"and experience of a senior software engineer.",
|
60 |
label="System message",
|
61 |
),
|
62 |
gr.Slider(
|