Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -44,17 +44,16 @@ def stream_chat(
|
|
44 |
message: str,
|
45 |
history: list,
|
46 |
system_prompt: str,
|
47 |
-
temperature: float = 0.
|
48 |
-
max_new_tokens: int =
|
49 |
top_p: float = 1.0,
|
50 |
top_k: int = 50,
|
51 |
-
penalty: float = 1.
|
52 |
):
|
53 |
print(f'message: {message}')
|
54 |
print(f'history: {history}')
|
55 |
|
56 |
conversation = [
|
57 |
-
{"role": "system", "content": ""}
|
58 |
]
|
59 |
for prompt, answer in history:
|
60 |
conversation.extend([
|
@@ -134,7 +133,7 @@ with gr.Blocks(css=CSS, theme="soft") as demo:
|
|
134 |
minimum=1,
|
135 |
maximum=50,
|
136 |
step=1,
|
137 |
-
value=
|
138 |
label="top_k",
|
139 |
render=False,
|
140 |
),
|
|
|
44 |
message: str,
|
45 |
history: list,
|
46 |
system_prompt: str,
|
47 |
+
temperature: float = 0.2,
|
48 |
+
max_new_tokens: int = 4096,
|
49 |
top_p: float = 1.0,
|
50 |
top_k: int = 50,
|
51 |
+
penalty: float = 1.1,
|
52 |
):
|
53 |
print(f'message: {message}')
|
54 |
print(f'history: {history}')
|
55 |
|
56 |
conversation = [
|
|
|
57 |
]
|
58 |
for prompt, answer in history:
|
59 |
conversation.extend([
|
|
|
133 |
minimum=1,
|
134 |
maximum=50,
|
135 |
step=1,
|
136 |
+
value=1,
|
137 |
label="top_k",
|
138 |
render=False,
|
139 |
),
|