Spaces:
Sleeping
Sleeping
youzarsiph
commited on
Commit
•
f4ddcf4
1
Parent(s):
862772f
update sdk_version
Browse files
README.md
CHANGED
@@ -4,10 +4,10 @@ emoji: 💬
|
|
4 |
colorFrom: yellow
|
5 |
colorTo: purple
|
6 |
sdk: gradio
|
7 |
-
sdk_version:
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
license: mit
|
11 |
---
|
12 |
|
13 |
-
An example chatbot using [Gradio](https://gradio.app), [`huggingface_hub`](https://huggingface.co/docs/huggingface_hub/v0.22.2/en/index), and the [Hugging Face Inference API](https://huggingface.co/docs/api-inference/index).
|
|
|
4 |
colorFrom: yellow
|
5 |
colorTo: purple
|
6 |
sdk: gradio
|
7 |
+
sdk_version: 5.0
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
license: mit
|
11 |
---
|
12 |
|
13 |
+
An example chatbot using [Gradio](https://gradio.app), [`huggingface_hub`](https://huggingface.co/docs/huggingface_hub/v0.22.2/en/index), and the [Hugging Face Inference API](https://huggingface.co/docs/api-inference/index).
|
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,8 +48,9 @@ def chat(
|
|
53 |
# UI
|
54 |
demo = gr.ChatInterface(
|
55 |
chat,
|
56 |
-
title="Phi-3.5-mini-instruct",
|
57 |
theme="soft",
|
|
|
|
|
58 |
description="Phi-3.5-mini is a lightweight, state-of-the-art open model built upon "
|
59 |
"datasets used for Phi-3 - synthetic data and filtered publicly available websites - "
|
60 |
"with a focus on very high-quality, reasoning dense data.",
|
|
|
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 |
theme="soft",
|
52 |
+
type="messages",
|
53 |
+
title="Phi-3.5-mini-instruct",
|
54 |
description="Phi-3.5-mini is a lightweight, state-of-the-art open model built upon "
|
55 |
"datasets used for Phi-3 - synthetic data and filtered publicly available websites - "
|
56 |
"with a focus on very high-quality, reasoning dense data.",
|