Update app.py
Browse files
app.py
CHANGED
@@ -61,17 +61,22 @@ def gradio_predict(user_message, system_message, max_new_tokens, temperature, to
|
|
61 |
|
62 |
Tulu_bot = TuluChatBot(model, tokenizer)
|
63 |
|
|
|
64 |
with gr.Blocks() as demo:
|
65 |
with gr.Row():
|
66 |
user_message = gr.Textbox(label="Your Message", lines=3)
|
67 |
system_message = gr.Textbox(label="Introduce a Character Here or Set a Scene (system prompt)", lines=2)
|
68 |
with gr.Row():
|
69 |
do_sample = gr.Checkbox(label="Advanced", value=False)
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
|
|
|
|
|
|
|
|
75 |
submit_button = gr.Button("Submit")
|
76 |
output_text = gr.Textbox()
|
77 |
|
|
|
61 |
|
62 |
Tulu_bot = TuluChatBot(model, tokenizer)
|
63 |
|
64 |
+
|
65 |
with gr.Blocks() as demo:
|
66 |
with gr.Row():
|
67 |
user_message = gr.Textbox(label="Your Message", lines=3)
|
68 |
system_message = gr.Textbox(label="Introduce a Character Here or Set a Scene (system prompt)", lines=2)
|
69 |
with gr.Row():
|
70 |
do_sample = gr.Checkbox(label="Advanced", value=False)
|
71 |
+
|
72 |
+
# Advanced settings in an Accordion
|
73 |
+
with gr.Accordion("Advanced Settings", open=False).style(visible=lambda do_sample: do_sample):
|
74 |
+
with gr.Row():
|
75 |
+
max_new_tokens = gr.Slider(label="Max new tokens", value=1269, minimum=550, maximum=3200, step=1)
|
76 |
+
temperature = gr.Slider(label="Temperature", value=1.2, minimum=0.05, maximum=4.0, step=0.05)
|
77 |
+
top_p = gr.Slider(label="Top-p (nucleus sampling)", value=0.90, minimum=0.01, maximum=0.99, step=0.05)
|
78 |
+
repetition_penalty = gr.Slider(label="Repetition penalty", value=1.9, minimum=1.0, maximum=2.0, step=0.05)
|
79 |
+
|
80 |
submit_button = gr.Button("Submit")
|
81 |
output_text = gr.Textbox()
|
82 |
|