Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,8 +9,8 @@ client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
|
|
| 9 |
|
| 10 |
PERSONALITY = os.environ.get("CHATBOT_PERSONALITY")
|
| 11 |
|
| 12 |
-
def
|
| 13 |
-
custom_prompt = PERSONALITY + "\n\nUser: " + message + "\
|
| 14 |
history.append((message))
|
| 15 |
return history
|
| 16 |
|
|
@@ -19,7 +19,7 @@ def chatbot(message, history):
|
|
| 19 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
| 20 |
"""
|
| 21 |
demo = gr.ChatInterface(
|
| 22 |
-
|
| 23 |
title="Shinobi - Japanese Culture Specialist",
|
| 24 |
description="A chatbot specializing in Japanese culture.",
|
| 25 |
type="messages"
|
|
|
|
| 9 |
|
| 10 |
PERSONALITY = os.environ.get("CHATBOT_PERSONALITY")
|
| 11 |
|
| 12 |
+
def role(message, history):
|
| 13 |
+
custom_prompt = PERSONALITY + "\n\nUser: " + message + "\nrole:"
|
| 14 |
history.append((message))
|
| 15 |
return history
|
| 16 |
|
|
|
|
| 19 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
| 20 |
"""
|
| 21 |
demo = gr.ChatInterface(
|
| 22 |
+
role,
|
| 23 |
title="Shinobi - Japanese Culture Specialist",
|
| 24 |
description="A chatbot specializing in Japanese culture.",
|
| 25 |
type="messages"
|