Update app.py
Browse files
app.py
CHANGED
@@ -102,26 +102,43 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
102 |
with gr.Row():
|
103 |
with gr.Column(scale=1):
|
104 |
gr.Markdown("### Settings")
|
105 |
-
max_tokens_slider = gr.Slider(
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
with gr.Accordion("Advanced Settings", open=False):
|
107 |
-
temperature_slider = gr.Slider(
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
gr.Markdown("**Try these examples:**")
|
121 |
with gr.Row():
|
122 |
-
example1_button = gr.Button("
|
123 |
-
example2_button = gr.Button("
|
124 |
-
example3_button = gr.Button("
|
125 |
|
126 |
submit_button.click(
|
127 |
fn=generate_response,
|
|
|
102 |
with gr.Row():
|
103 |
with gr.Column(scale=1):
|
104 |
gr.Markdown("### Settings")
|
105 |
+
max_tokens_slider = gr.Slider(
|
106 |
+
minimum=6144,
|
107 |
+
maximum=32768,
|
108 |
+
step=1024,
|
109 |
+
value=16384,
|
110 |
+
label="Max Tokens"
|
111 |
+
)
|
112 |
with gr.Accordion("Advanced Settings", open=False):
|
113 |
+
temperature_slider = gr.Slider(
|
114 |
+
minimum=0.1,
|
115 |
+
maximum=2.0,
|
116 |
+
value=0.6,
|
117 |
+
label="Temperature"
|
118 |
+
)
|
119 |
+
top_p_slider = gr.Slider(
|
120 |
+
minimum=0.1,
|
121 |
+
maximum=1.0,
|
122 |
+
value=0.95,
|
123 |
+
label="Top-p"
|
124 |
+
)
|
125 |
+
|
126 |
+
with gr.Column(scale=4):
|
127 |
+
chatbot = gr.Chatbot(label="Chat", type="messages")
|
128 |
+
with gr.Column():
|
129 |
+
user_input = gr.Textbox(
|
130 |
+
label="User Input",
|
131 |
+
placeholder="Type your question here...",
|
132 |
+
lines=2
|
133 |
+
)
|
134 |
+
with gr.Row():
|
135 |
+
submit_button = gr.Button("Send", variant="primary")
|
136 |
+
clear_button = gr.Button("Clear")
|
137 |
gr.Markdown("**Try these examples:**")
|
138 |
with gr.Row():
|
139 |
+
example1_button = gr.Button("Combinatorics")
|
140 |
+
example2_button = gr.Button("Co-ordinate Geometry")
|
141 |
+
example3_button = gr.Button("Prob-Stats")
|
142 |
|
143 |
submit_button.click(
|
144 |
fn=generate_response,
|