Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -92,16 +92,7 @@ with gr.Blocks(title="LeCarnet - Chat Interface") as demo:
|
|
92 |
temperature = gr.Slider(0.1, 2.0, value=0.4, step=0.1, label="Temperature")
|
93 |
top_p = gr.Slider(0.1, 1.0, value=0.9, step=0.05, label="Top-p Sampling")
|
94 |
clear_button = gr.Button("Clear Chat")
|
95 |
-
|
96 |
-
with gr.Column(scale=4):
|
97 |
-
chatbot = gr.Chatbot(
|
98 |
-
bubble_full_width=False,
|
99 |
-
height=500
|
100 |
-
)
|
101 |
-
msg_input = gr.Textbox(
|
102 |
-
placeholder="Type your message and press Enter...",
|
103 |
-
label="User Input"
|
104 |
-
)
|
105 |
gr.Examples(
|
106 |
examples=[
|
107 |
["Il était une fois un petit phoque nommé Zoom. Zoom était très habile et aimait jouer dans l'eau."],
|
@@ -112,6 +103,16 @@ with gr.Blocks(title="LeCarnet - Chat Interface") as demo:
|
|
112 |
label="Example Prompts"
|
113 |
)
|
114 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
model_selector.change(fn=update_model, inputs=[model_selector], outputs=[])
|
116 |
msg_input.submit(fn=user, inputs=[msg_input, chatbot], outputs=[msg_input, chatbot], queue=False).then(
|
117 |
fn=bot, inputs=[chatbot, max_tokens, temperature, top_p], outputs=[chatbot]
|
|
|
92 |
temperature = gr.Slider(0.1, 2.0, value=0.4, step=0.1, label="Temperature")
|
93 |
top_p = gr.Slider(0.1, 1.0, value=0.9, step=0.05, label="Top-p Sampling")
|
94 |
clear_button = gr.Button("Clear Chat")
|
95 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
gr.Examples(
|
97 |
examples=[
|
98 |
["Il était une fois un petit phoque nommé Zoom. Zoom était très habile et aimait jouer dans l'eau."],
|
|
|
103 |
label="Example Prompts"
|
104 |
)
|
105 |
|
106 |
+
with gr.Column(scale=4):
|
107 |
+
chatbot = gr.Chatbot(
|
108 |
+
bubble_full_width=False,
|
109 |
+
height=500
|
110 |
+
)
|
111 |
+
msg_input = gr.Textbox(
|
112 |
+
placeholder="Il était une fois un petit garçon",
|
113 |
+
label="User Input"
|
114 |
+
)
|
115 |
+
|
116 |
model_selector.change(fn=update_model, inputs=[model_selector], outputs=[])
|
117 |
msg_input.submit(fn=user, inputs=[msg_input, chatbot], outputs=[msg_input, chatbot], queue=False).then(
|
118 |
fn=bot, inputs=[chatbot, max_tokens, temperature, top_p], outputs=[chatbot]
|