update layout; added a column container
Browse files
app.py
CHANGED
@@ -61,19 +61,20 @@ Assistant: <utterance>
|
|
61 |
In this app, you can explore the outputs of a 20B large language model.
|
62 |
"""
|
63 |
|
64 |
-
with gr.Blocks(css = "#
|
65 |
gr.HTML(title)
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
|
|
77 |
|
78 |
#b1.click(predict, [t,s], [c,s])
|
79 |
#inputs.submit(predict, [t,s], [c,s])
|
|
|
61 |
In this app, you can explore the outputs of a 20B large language model.
|
62 |
"""
|
63 |
|
64 |
+
with gr.Blocks(css = "#col_container {width: 700px; height: 400px; overflow: auto;}") as demo:
|
65 |
gr.HTML(title)
|
66 |
+
with gr.Column(elem_id = "col_container"):
|
67 |
+
chatbot = gr.Chatbot(elem_id='chatbot') #c
|
68 |
+
inputs = gr.Textbox(placeholder= "Hi my name is Joe.", label= "Type an input and press Enter") #t
|
69 |
+
state = gr.State([]) #s
|
70 |
+
b1 = gr.Button()
|
71 |
+
|
72 |
+
#inputs, top_p, temperature, top_k, repetition_penalty
|
73 |
+
with gr.Accordion("Parameters", open=False):
|
74 |
+
top_p = gr.Slider( minimum=-0, maximum=1.0, value=0.95, step=0.05, interactive=True, label="Top-p (nucleus sampling)",)
|
75 |
+
temperature = gr.Slider( minimum=-0, maximum=5.0, value=0.5, step=0.1, interactive=True, label="Temperature",)
|
76 |
+
top_k = gr.Slider( minimum=1, maximum=50, value=4, step=1, interactive=True, label="Top-k",)
|
77 |
+
repetition_penalty = gr.Slider( minimum=0.1, maximum=3.0, value=1.03, step=0.01, interactive=True, label="Repetition Penalty", )
|
78 |
|
79 |
#b1.click(predict, [t,s], [c,s])
|
80 |
#inputs.submit(predict, [t,s], [c,s])
|