Commit
·
4b04f09
1
Parent(s):
a7c2b73
Update chatbot interface sliders
Browse files
app.py
CHANGED
@@ -68,15 +68,15 @@ def chat(history, system_message, max_tokens, temperature, top_p, top_k, repetit
|
|
68 |
with gr.Blocks() as demo:
|
69 |
with gr.Row():
|
70 |
with gr.Column():
|
71 |
-
gr.Markdown("
|
72 |
chatbot = gr.Chatbot()
|
73 |
message = gr.Textbox(label="What do you want to chat about?", placeholder="Ask me anything.", lines=3)
|
74 |
submit = gr.Button(value="Send message")
|
75 |
clear = gr.Button(value="New topic")
|
76 |
system_msg = gr.Textbox(BASE_SYSTEM_MESSAGE, label="System Message", placeholder="System prompt.", lines=5)
|
77 |
-
max_tokens = gr.Slider(20, 512, label="Max Tokens", step=20, value=500)
|
78 |
-
temperature = gr.Slider(0.0, 1.0, label="Temperature", step=0.1, value=0.7)
|
79 |
-
top_p = gr.Slider(0.0, 1.0, label="Top P", step=0.05, value=0.95)
|
80 |
chat_history_state = gr.State([])
|
81 |
|
82 |
def update_chatbot(message, chat_history, system_message=BASE_SYSTEM_MESSAGE):
|
|
|
68 |
with gr.Blocks() as demo:
|
69 |
with gr.Row():
|
70 |
with gr.Column():
|
71 |
+
gr.Markdown("CodeLLAMA 34B Free Demo")
|
72 |
chatbot = gr.Chatbot()
|
73 |
message = gr.Textbox(label="What do you want to chat about?", placeholder="Ask me anything.", lines=3)
|
74 |
submit = gr.Button(value="Send message")
|
75 |
clear = gr.Button(value="New topic")
|
76 |
system_msg = gr.Textbox(BASE_SYSTEM_MESSAGE, label="System Message", placeholder="System prompt.", lines=5)
|
77 |
+
max_tokens = gr.Slider(20, 512, label="Max Tokens", step=20, value=500, interactive=True)
|
78 |
+
temperature = gr.Slider(0.0, 1.0, label="Temperature", step=0.1, value=0.7, interactive=True)
|
79 |
+
top_p = gr.Slider(0.0, 1.0, label="Top P", step=0.05, value=0.95, interactive=True)
|
80 |
chat_history_state = gr.State([])
|
81 |
|
82 |
def update_chatbot(message, chat_history, system_message=BASE_SYSTEM_MESSAGE):
|