dual chats ?
Browse files
app.py
CHANGED
|
@@ -6,7 +6,7 @@ from huggingface_hub import InferenceClient
|
|
| 6 |
For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
|
| 7 |
"""
|
| 8 |
|
| 9 |
-
#
|
| 10 |
client = InferenceClient("kolbeins/model")
|
| 11 |
|
| 12 |
|
|
@@ -29,6 +29,7 @@ def respond(
|
|
| 29 |
messages.append({"role": "user", "content": message})
|
| 30 |
|
| 31 |
response = ""
|
|
|
|
| 32 |
|
| 33 |
for message in client.chat_completion(
|
| 34 |
messages,
|
|
@@ -47,6 +48,7 @@ def respond(
|
|
| 47 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
| 48 |
"""
|
| 49 |
demo = gr.ChatInterface(
|
|
|
|
| 50 |
respond,
|
| 51 |
additional_inputs=[
|
| 52 |
gr.Textbox(value="You are a friendly Chatbot.", label="System message"),
|
|
|
|
| 6 |
For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
|
| 7 |
"""
|
| 8 |
|
| 9 |
+
# client2 = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
|
| 10 |
client = InferenceClient("kolbeins/model")
|
| 11 |
|
| 12 |
|
|
|
|
| 29 |
messages.append({"role": "user", "content": message})
|
| 30 |
|
| 31 |
response = ""
|
| 32 |
+
|
| 33 |
|
| 34 |
for message in client.chat_completion(
|
| 35 |
messages,
|
|
|
|
| 48 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
| 49 |
"""
|
| 50 |
demo = gr.ChatInterface(
|
| 51 |
+
respond,
|
| 52 |
respond,
|
| 53 |
additional_inputs=[
|
| 54 |
gr.Textbox(value="You are a friendly Chatbot.", label="System message"),
|