zealous79A
commited on
Update app.py
Browse filesLoad a new dataset related to the chat-gpt prompts
app.py
CHANGED
@@ -1,8 +1,11 @@
|
|
1 |
import gradio as gr
|
2 |
from huggingface_hub import InferenceClient
|
3 |
|
|
|
|
|
4 |
"""
|
5 |
-
For more information on `huggingface_hub` Inference API support,
|
|
|
6 |
"""
|
7 |
client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
|
8 |
|
@@ -41,7 +44,8 @@ def respond(
|
|
41 |
|
42 |
|
43 |
"""
|
44 |
-
For information on how to customize the ChatInterface,
|
|
|
45 |
"""
|
46 |
demo = gr.ChatInterface(
|
47 |
respond,
|
@@ -59,6 +63,9 @@ demo = gr.ChatInterface(
|
|
59 |
],
|
60 |
)
|
61 |
|
|
|
|
|
62 |
|
63 |
if __name__ == "__main__":
|
64 |
-
demo.launch()
|
|
|
|
1 |
import gradio as gr
|
2 |
from huggingface_hub import InferenceClient
|
3 |
|
4 |
+
from datasets import load_dataset
|
5 |
+
|
6 |
"""
|
7 |
+
For more information on `huggingface_hub` Inference API support,
|
8 |
+
please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
|
9 |
"""
|
10 |
client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
|
11 |
|
|
|
44 |
|
45 |
|
46 |
"""
|
47 |
+
For information on how to customize the ChatInterface,
|
48 |
+
peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
49 |
"""
|
50 |
demo = gr.ChatInterface(
|
51 |
respond,
|
|
|
63 |
],
|
64 |
)
|
65 |
|
66 |
+
def load_new_dataset():
|
67 |
+
ds = load_dataset("fka/awesome-chatgpt-prompts")
|
68 |
|
69 |
if __name__ == "__main__":
|
70 |
+
# demo.launch()
|
71 |
+
load_new_dataset()
|