Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
import random
|
| 3 |
from huggingface_hub import InferenceClient
|
| 4 |
|
| 5 |
client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
|
|
@@ -12,7 +12,7 @@ def respond(message, history):
|
|
| 12 |
response = client.chat_completion(
|
| 13 |
messages,
|
| 14 |
max_tokens=100
|
| 15 |
-
)
|
| 16 |
return response['choices'][0]['message']['content'].strip()
|
| 17 |
|
| 18 |
chatbot = gr.ChatInterface(respond, type="messages")
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
# import random
|
| 3 |
from huggingface_hub import InferenceClient
|
| 4 |
|
| 5 |
client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
|
|
|
|
| 12 |
response = client.chat_completion(
|
| 13 |
messages,
|
| 14 |
max_tokens=100
|
| 15 |
+
)
|
| 16 |
return response['choices'][0]['message']['content'].strip()
|
| 17 |
|
| 18 |
chatbot = gr.ChatInterface(respond, type="messages")
|