Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ client = InferenceClient(model="https://api-inference.huggingface.co/models/meta
|
|
11 |
# query client using streaming mode
|
12 |
def inference(message, history):
|
13 |
partial_message = ""
|
14 |
-
for token in client.text_generation(message, max_new_tokens=
|
15 |
partial_message += token
|
16 |
yield partial_message
|
17 |
|
|
|
11 |
# query client using streaming mode
|
12 |
def inference(message, history):
|
13 |
partial_message = ""
|
14 |
+
for token in client.text_generation(message, max_new_tokens=100, stream=True):
|
15 |
partial_message += token
|
16 |
yield partial_message
|
17 |
|