Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -7,11 +7,14 @@ from huggingface_hub import InferenceClient
|
|
7 |
#from transformers import pipeline
|
8 |
import torch
|
9 |
|
10 |
-
#
|
11 |
-
from transformers import
|
12 |
|
13 |
-
|
14 |
-
|
|
|
|
|
|
|
15 |
|
16 |
def chat(input_text, history=[]):
|
17 |
history.append(input_text)
|
|
|
7 |
#from transformers import pipeline
|
8 |
import torch
|
9 |
|
10 |
+
# Use a pipeline as a high-level helper
|
11 |
+
from transformers import pipeline
|
12 |
|
13 |
+
messages = [
|
14 |
+
{"role": "user", "content": "Who are you?"},
|
15 |
+
]
|
16 |
+
pipe = pipeline("text-generation", model="deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B")
|
17 |
+
pipe(messages)
|
18 |
|
19 |
def chat(input_text, history=[]):
|
20 |
history.append(input_text)
|