Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -67,7 +67,7 @@ def check_rand(inp, val):
|
|
67 |
return gr.Slider(label="Seed", minimum=1, maximum=1111111111111111, value=int(val))
|
68 |
|
69 |
|
70 |
-
with gr.Blocks() as app:
|
71 |
gr.HTML(
|
72 |
"""<center><h1 style='font-size:xx-large;'>CalmChat</h1></center>""")
|
73 |
with gr.Group():
|
@@ -87,7 +87,7 @@ with gr.Blocks() as app:
|
|
87 |
with gr.Group():
|
88 |
temp = gr.Slider(label="Temperature", step=0.01, minimum=0.01, maximum=1.0, value=0.9)
|
89 |
top_p = gr.Slider(label="Top-P", step=0.01, minimum=0.01, maximum=1.0, value=0.9)
|
90 |
-
rep_p = gr.Slider(label="Repetition Penalty", step=0.1, minimum=0.1, maximum=2.0, value=1.0)
|
91 |
|
92 |
with gr.Group():
|
93 |
with gr.Row():
|
@@ -99,12 +99,10 @@ with gr.Blocks() as app:
|
|
99 |
stop_btn = gr.Button("Stop")
|
100 |
clear_btn = gr.Button("Clear")
|
101 |
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
#rep_p], chat_b)
|
108 |
-
#stop_btn.click(None, None, None, cancels=[go, chat_sub])
|
109 |
clear_btn.click(clear_fn, None, [chat_b])
|
110 |
app.queue(default_concurrency_limit=10).launch()
|
|
|
67 |
return gr.Slider(label="Seed", minimum=1, maximum=1111111111111111, value=int(val))
|
68 |
|
69 |
|
70 |
+
with gr.Blocks(theme=gr.themes.Glass(),css=".gradio-container {background-color: rgb(134 239 172)}") as app:
|
71 |
gr.HTML(
|
72 |
"""<center><h1 style='font-size:xx-large;'>CalmChat</h1></center>""")
|
73 |
with gr.Group():
|
|
|
87 |
with gr.Group():
|
88 |
temp = gr.Slider(label="Temperature", step=0.01, minimum=0.01, maximum=1.0, value=0.9)
|
89 |
top_p = gr.Slider(label="Top-P", step=0.01, minimum=0.01, maximum=1.0, value=0.9)
|
90 |
+
#rep_p = gr.Slider(label="Repetition Penalty", step=0.1, minimum=0.1, maximum=2.0, value=1.0)
|
91 |
|
92 |
with gr.Group():
|
93 |
with gr.Row():
|
|
|
99 |
stop_btn = gr.Button("Stop")
|
100 |
clear_btn = gr.Button("Clear")
|
101 |
|
102 |
+
chat_sub = inp.submit(check_rand, [rand]).then(chat_inf,
|
103 |
+
[sys_inp, inp, chat_b, client_choice, temp, tokens, top_p], chat_b)
|
104 |
+
go = btn.click(check_rand, [rand, seed], seed).then(chat_inf,
|
105 |
+
[sys_inp, inp, chat_b, client_choice, temp, tokens, top_p], chat_b)
|
106 |
+
stop_btn.click(None, None, None, cancels=[go, chat_sub])
|
|
|
|
|
107 |
clear_btn.click(clear_fn, None, [chat_b])
|
108 |
app.queue(default_concurrency_limit=10).launch()
|