Update app.py
Browse files
app.py
CHANGED
|
@@ -80,15 +80,16 @@ def generate_response(message, max_tokens, temperature, top_p):
|
|
| 80 |
|
| 81 |
# Interface Gradio
|
| 82 |
with gr.Blocks(css=css, theme="NoCrypt/miku") as app:
|
| 83 |
-
chatbot = gr.Chatbot(label="Synap
|
| 84 |
msg = gr.Textbox(label="Mensagem", placeholder="Digite aqui...", lines=2)
|
| 85 |
-
send_btn = gr.Button("
|
| 86 |
-
stop_btn = gr.Button("
|
| 87 |
-
|
| 88 |
-
max_tokens = gr.Slider(64, 1024, value=128, step=1, label="Max Tokens")
|
| 89 |
-
temperature = gr.Slider(0.1, 1.5, value=0.7, step=0.1, label="Temperature")
|
| 90 |
-
top_p = gr.Slider(0.1, 1.0, value=0.95, step=0.05, label="Top-p")
|
| 91 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 92 |
state = gr.State([]) # histórico apenas visual
|
| 93 |
|
| 94 |
def update_chat(message, chat_history):
|
|
|
|
| 80 |
|
| 81 |
# Interface Gradio
|
| 82 |
with gr.Blocks(css=css, theme="NoCrypt/miku") as app:
|
| 83 |
+
chatbot = gr.Chatbot(label="Synap by λχ", elem_id="chatbot")
|
| 84 |
msg = gr.Textbox(label="Mensagem", placeholder="Digite aqui...", lines=2)
|
| 85 |
+
send_btn = gr.Button("Sonhar")
|
| 86 |
+
stop_btn = gr.Button("Acordar")
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
|
| 88 |
+
with gr.Accordion("⚙️", open=False):
|
| 89 |
+
max_tokens = gr.Slider(64, 512, value=128, step=1, label="Max Tokens")
|
| 90 |
+
temperature = gr.Slider(0.1, 1.5, value=0.7, step=0.1, label="Temperature")
|
| 91 |
+
top_p = gr.Slider(0.1, 1.0, value=0.9, step=0.05, label="Top-p")
|
| 92 |
+
|
| 93 |
state = gr.State([]) # histórico apenas visual
|
| 94 |
|
| 95 |
def update_chat(message, chat_history):
|