Spaces:
Paused
Paused
smileycutie0 commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,7 +4,7 @@ from huggingface_hub import InferenceClient
|
|
| 4 |
client = InferenceClient("HuggingFaceTB/SmolLM2-1.7B-Instruct")
|
| 5 |
|
| 6 |
def chat(message, history):
|
| 7 |
-
|
| 8 |
stream = client.chat.completions.create(
|
| 9 |
messages=history,
|
| 10 |
max_tokens=1024,
|
|
|
|
| 4 |
client = InferenceClient("HuggingFaceTB/SmolLM2-1.7B-Instruct")
|
| 5 |
|
| 6 |
def chat(message, history):
|
| 7 |
+
history.append({"role": "user", "content": message})
|
| 8 |
stream = client.chat.completions.create(
|
| 9 |
messages=history,
|
| 10 |
max_tokens=1024,
|