Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ client = Cerebras(
|
|
7 |
)
|
8 |
|
9 |
TTILE = """
|
10 |
-
<h1 align="center"
|
11 |
"""
|
12 |
NOTICE = """
|
13 |
Current only support Llama3.1 8B and Llama 3.1 70B.
|
@@ -17,11 +17,12 @@ def respond(
|
|
17 |
message,
|
18 |
history: list[tuple[str, str]],
|
19 |
model_id,
|
|
|
20 |
max_tokens,
|
21 |
temperature,
|
22 |
top_p,
|
23 |
):
|
24 |
-
messages = []
|
25 |
|
26 |
for val in history:
|
27 |
if val[0]:
|
@@ -56,6 +57,7 @@ chatbot = gr.ChatInterface(
|
|
56 |
value="llama3.1-8b",
|
57 |
label="Models"
|
58 |
),
|
|
|
59 |
gr.Slider(minimum=1, maximum=8192, value=4096, step=1, label="Max new tokens"),
|
60 |
gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
|
61 |
gr.Slider(
|
|
|
7 |
)
|
8 |
|
9 |
TTILE = """
|
10 |
+
<h1 align="center">🚀 Try the world's fastest inference by Cerebras ⚡</h1>
|
11 |
"""
|
12 |
NOTICE = """
|
13 |
Current only support Llama3.1 8B and Llama 3.1 70B.
|
|
|
17 |
message,
|
18 |
history: list[tuple[str, str]],
|
19 |
model_id,
|
20 |
+
system_message,
|
21 |
max_tokens,
|
22 |
temperature,
|
23 |
top_p,
|
24 |
):
|
25 |
+
messages = [{"role": "system", "content": system_message}]
|
26 |
|
27 |
for val in history:
|
28 |
if val[0]:
|
|
|
57 |
value="llama3.1-8b",
|
58 |
label="Models"
|
59 |
),
|
60 |
+
gr.Textbox(value="You are a friendly assistant.", label="System message"),
|
61 |
gr.Slider(minimum=1, maximum=8192, value=4096, step=1, label="Max new tokens"),
|
62 |
gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
|
63 |
gr.Slider(
|