youzarsiph
commited on
Commit
•
bcecfba
1
Parent(s):
fd82807
update sdk_version
Browse files
README.md
CHANGED
@@ -4,7 +4,7 @@ emoji: 💬
|
|
4 |
colorFrom: blue
|
5 |
colorTo: pink
|
6 |
sdk: gradio
|
7 |
-
sdk_version:
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
license: mit
|
|
|
4 |
colorFrom: blue
|
5 |
colorTo: pink
|
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})
|
@@ -53,6 +48,7 @@ def chat(
|
|
53 |
# UI
|
54 |
demo = gr.ChatInterface(
|
55 |
chat,
|
|
|
56 |
title="Mistral-Small-Instruct-2409",
|
57 |
description="A small version of Mistral AI, designed for instruction following tasks.",
|
58 |
additional_inputs=[
|
|
|
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})
|
|
|
48 |
# UI
|
49 |
demo = gr.ChatInterface(
|
50 |
chat,
|
51 |
+
type="messages",
|
52 |
title="Mistral-Small-Instruct-2409",
|
53 |
description="A small version of Mistral AI, designed for instruction following tasks.",
|
54 |
additional_inputs=[
|