Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -47,7 +47,7 @@ def stream_chat(message: str, history: list, system: str, temperature: float, ma
|
|
47 |
|
48 |
conversation.append({"role": "user", "content": message})
|
49 |
|
50 |
-
input_ids = tokenizer.apply_chat_template(conversation, return_tensors="pt").to(model.device)
|
51 |
streamer = TextIteratorStreamer(tokenizer, timeout=10.0, skip_prompt=True, skip_special_tokens=True)
|
52 |
|
53 |
generate_kwargs = dict(
|
@@ -84,7 +84,7 @@ with gr.Blocks(fill_height=True) as demo:
|
|
84 |
minimum=0,
|
85 |
maximum=1,
|
86 |
step=0.1,
|
87 |
-
value=0.
|
88 |
label="Temperature",
|
89 |
render=False,
|
90 |
),
|
|
|
47 |
|
48 |
conversation.append({"role": "user", "content": message})
|
49 |
|
50 |
+
input_ids = tokenizer.apply_chat_template(conversation, add_generation_prompt=True, return_tensors="pt").to(model.device)
|
51 |
streamer = TextIteratorStreamer(tokenizer, timeout=10.0, skip_prompt=True, skip_special_tokens=True)
|
52 |
|
53 |
generate_kwargs = dict(
|
|
|
84 |
minimum=0,
|
85 |
maximum=1,
|
86 |
step=0.1,
|
87 |
+
value=0.8,
|
88 |
label="Temperature",
|
89 |
render=False,
|
90 |
),
|