Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -13,9 +13,9 @@ def respond(
|
|
13 |
message,
|
14 |
history: list[tuple[str, str]],
|
15 |
system_message,
|
16 |
-
max_tokens,
|
17 |
-
temperature,
|
18 |
-
top_p,
|
19 |
):
|
20 |
messages = [{"role": "system", "content": system_message}]
|
21 |
|
@@ -32,9 +32,9 @@ def respond(
|
|
32 |
model="nvidia/llama-3.1-nemotron-70b-instruct",
|
33 |
messages=messages,
|
34 |
stream=True,
|
35 |
-
temperature=temperature,
|
36 |
-
top_p=top_p,
|
37 |
-
max_tokens=max_tokens,
|
38 |
)
|
39 |
|
40 |
for message in completion:
|
@@ -59,15 +59,15 @@ with gr.Blocks() as demo:
|
|
59 |
respond,
|
60 |
additional_inputs=[
|
61 |
gr.Textbox(value="You are a friendly Chatbot.", label="System message"),
|
62 |
-
gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
|
63 |
-
gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
|
64 |
-
gr.Slider(
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
),
|
71 |
],
|
72 |
)
|
73 |
else:
|
|
|
13 |
message,
|
14 |
history: list[tuple[str, str]],
|
15 |
system_message,
|
16 |
+
# max_tokens,
|
17 |
+
# temperature,
|
18 |
+
# top_p,
|
19 |
):
|
20 |
messages = [{"role": "system", "content": system_message}]
|
21 |
|
|
|
32 |
model="nvidia/llama-3.1-nemotron-70b-instruct",
|
33 |
messages=messages,
|
34 |
stream=True,
|
35 |
+
# temperature=temperature,
|
36 |
+
# top_p=top_p,
|
37 |
+
# max_tokens=max_tokens,
|
38 |
)
|
39 |
|
40 |
for message in completion:
|
|
|
59 |
respond,
|
60 |
additional_inputs=[
|
61 |
gr.Textbox(value="You are a friendly Chatbot.", label="System message"),
|
62 |
+
# gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
|
63 |
+
# gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
|
64 |
+
# gr.Slider(
|
65 |
+
# minimum=0.1,
|
66 |
+
# maximum=1.0,
|
67 |
+
# value=0.95,
|
68 |
+
# step=0.05,
|
69 |
+
# label="Top-p (nucleus sampling)",
|
70 |
+
# ),
|
71 |
],
|
72 |
)
|
73 |
else:
|