Spaces:
Running
Running
seawolf2357
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -17,13 +17,13 @@ memory = deque(maxlen=10)
|
|
17 |
def respond(
|
18 |
message,
|
19 |
history: list[tuple[str, str]],
|
20 |
-
system_message="
|
21 |
max_tokens=512,
|
22 |
temperature=0.7,
|
23 |
top_p=0.95,
|
24 |
):
|
25 |
# μμ€ν
λ©μμ§μ μ λμ¬ μΆκ°
|
26 |
-
system_prefix = "System: "
|
27 |
full_system_message = f"{system_prefix}{system_message}"
|
28 |
|
29 |
# νμ¬ λν λ΄μ©μ λ©λͺ¨λ¦¬μ μΆκ°
|
@@ -73,9 +73,9 @@ demo = gr.ChatInterface(
|
|
73 |
fn=respond,
|
74 |
theme=theme,
|
75 |
additional_inputs=[
|
76 |
-
gr.Textbox(value="
|
77 |
-
gr.Slider(minimum=1, maximum=
|
78 |
-
gr.Slider(minimum=0.1, maximum
|
79 |
gr.Slider(minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-p (nucleus sampling)"),
|
80 |
],
|
81 |
)
|
|
|
17 |
def respond(
|
18 |
message,
|
19 |
history: list[tuple[str, str]],
|
20 |
+
system_message="AI Assistant Role",
|
21 |
max_tokens=512,
|
22 |
temperature=0.7,
|
23 |
top_p=0.95,
|
24 |
):
|
25 |
# μμ€ν
λ©μμ§μ μ λμ¬ μΆκ°
|
26 |
+
system_prefix = "System: μ
λ ₯μ΄μ μΈμ΄(μμ΄, νκ΅μ΄, μ€κ΅μ΄, μΌλ³Έμ΄ λ±)μ λ°λΌ λμΌν μΈμ΄λ‘ λ΅λ³νλΌ."
|
27 |
full_system_message = f"{system_prefix}{system_message}"
|
28 |
|
29 |
# νμ¬ λν λ΄μ©μ λ©λͺ¨λ¦¬μ μΆκ°
|
|
|
73 |
fn=respond,
|
74 |
theme=theme,
|
75 |
additional_inputs=[
|
76 |
+
gr.Textbox(value="AI Assistant Role", label="System message"),
|
77 |
+
gr.Slider(minimum=1, maximum=8000, value=512, step=1, label="Max new tokens"),
|
78 |
+
gr.Slider(minimum=0.1, maximum 1.0, value=0.7, step=0.1, label="Temperature"),
|
79 |
gr.Slider(minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-p (nucleus sampling)"),
|
80 |
],
|
81 |
)
|