initial commit
Browse files
app.py
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
from huggingface_hub import InferenceClient
|
| 3 |
+
|
| 4 |
+
client = InferenceClient.("HuggingFaceH4/zephyr-7b-beta")
|
| 5 |
+
|
| 6 |
+
def respond(message, history):
|
| 7 |
+
|
| 8 |
+
messages = [{"role": "system", "content": "You are a friendly chatbot."}]
|
| 9 |
+
|
| 10 |
+
if history:
|
| 11 |
+
messages.extend(history)
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
|