Spaces:
Sleeping
Sleeping
History toggle working
Browse filesCleared up some comments, and added a refence to the original code.
app.py
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
import gradio as gr
|
2 |
from huggingface_hub import InferenceClient
|
3 |
-
# Built from the gradio/chatbot example
|
4 |
|
5 |
"""
|
|
|
|
|
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 |
|
@@ -50,10 +50,6 @@ def respond(
|
|
50 |
history.append((message, response))
|
51 |
|
52 |
|
53 |
-
|
54 |
-
"""
|
55 |
-
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
56 |
-
"""
|
57 |
demo = gr.ChatInterface(
|
58 |
respond,
|
59 |
additional_inputs=[
|
|
|
1 |
import gradio as gr
|
2 |
from huggingface_hub import InferenceClient
|
|
|
3 |
|
4 |
"""
|
5 |
+
Cloned from https://huggingface.co/spaces/gradio-templates/chatbot - and added the history toggle to the interface
|
6 |
+
|
7 |
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
|
8 |
"""
|
9 |
|
|
|
10 |
client = InferenceClient("kolbeins/model")
|
11 |
|
12 |
|
|
|
50 |
history.append((message, response))
|
51 |
|
52 |
|
|
|
|
|
|
|
|
|
53 |
demo = gr.ChatInterface(
|
54 |
respond,
|
55 |
additional_inputs=[
|