Fix button scaling
Browse files
app.py
CHANGED
|
@@ -85,16 +85,16 @@ with gr.Blocks() as interface:
|
|
| 85 |
gr.Markdown("**Instructions:** Press `Shift + Enter` to submit, and `Enter` for a new line.")
|
| 86 |
|
| 87 |
# Add a clear history button
|
| 88 |
-
clear_button = gr.Button("Clear History"
|
| 89 |
clear_button.click(fn=clear_history, outputs=[chatbot_output])
|
| 90 |
|
| 91 |
# Input box for the user
|
| 92 |
user_input = gr.Textbox(label="Your Input", placeholder="Type your message here...", lines=2, show_label=True)
|
| 93 |
|
| 94 |
# Sliders for temperature, top_p, and top_k
|
| 95 |
-
temperature_slider = gr.Slider(0.1, 1.0, step=0.1, value=1.0, label="Temperature")
|
| 96 |
-
top_p_slider = gr.Slider(0.0, 1.0, step=0.1, value=1.0, label="Top-p")
|
| 97 |
-
top_k_slider = gr.Slider(1, 100, step=1, value=50, label="Top-k")
|
| 98 |
|
| 99 |
# Define the function to update the chat
|
| 100 |
def update_chat(input_text, chat_history, temperature, top_p, top_k):
|
|
|
|
| 85 |
gr.Markdown("**Instructions:** Press `Shift + Enter` to submit, and `Enter` for a new line.")
|
| 86 |
|
| 87 |
# Add a clear history button
|
| 88 |
+
clear_button = gr.Button("Clear History", scale=0)
|
| 89 |
clear_button.click(fn=clear_history, outputs=[chatbot_output])
|
| 90 |
|
| 91 |
# Input box for the user
|
| 92 |
user_input = gr.Textbox(label="Your Input", placeholder="Type your message here...", lines=2, show_label=True)
|
| 93 |
|
| 94 |
# Sliders for temperature, top_p, and top_k
|
| 95 |
+
temperature_slider = gr.Slider(0.1, 1.0, step=0.1, value=1.0, label="Temperature")
|
| 96 |
+
top_p_slider = gr.Slider(0.0, 1.0, step=0.1, value=1.0, label="Top-p")
|
| 97 |
+
top_k_slider = gr.Slider(1, 100, step=1, value=50, label="Top-k")
|
| 98 |
|
| 99 |
# Define the function to update the chat
|
| 100 |
def update_chat(input_text, chat_history, temperature, top_p, top_k):
|