Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,8 +1,8 @@
|
|
| 1 |
import random
|
| 2 |
import gradio as gr
|
| 3 |
-
from huggingface_hub import
|
| 4 |
|
| 5 |
-
client =
|
| 6 |
|
| 7 |
def random_response(message,history):
|
| 8 |
messages= [{"role": "system", "content": "You are a friendly chatbot."}]
|
|
@@ -19,6 +19,6 @@ def random_response(message,history):
|
|
| 19 |
return response.choices[0].message.content.strip()
|
| 20 |
|
| 21 |
|
| 22 |
-
chatbot = gr.
|
| 23 |
|
| 24 |
chatbot.launch()
|
|
|
|
| 1 |
import random
|
| 2 |
import gradio as gr
|
| 3 |
+
from huggingface_hub import InferenceClient
|
| 4 |
|
| 5 |
+
client = InferenceClient("Qwen/Qwen2.5-7B-Instruct")
|
| 6 |
|
| 7 |
def random_response(message,history):
|
| 8 |
messages= [{"role": "system", "content": "You are a friendly chatbot."}]
|
|
|
|
| 19 |
return response.choices[0].message.content.strip()
|
| 20 |
|
| 21 |
|
| 22 |
+
chatbot = gr.ChatInferface(random_response, title = "Magic 8 Ball Chatbot")
|
| 23 |
|
| 24 |
chatbot.launch()
|