SamiKoen commited on
Commit
7ce81f1
·
verified ·
1 Parent(s): c905e92

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -256,20 +256,18 @@ with gr.Blocks(css=demo_css, theme=theme) as demo:
256
  show_label=False,
257
  container=False,
258
  )
259
- # Sadece "Gönder" butonu bulunuyor.
260
- send_button = gr.Button(value="Gönder", elem_id="send_button")
261
 
262
  state = gr.State([])
263
 
264
- with gr.Accordion("", open=False, visible=False):
265
  top_p = gr.Slider(minimum=0, maximum=1.0, value=0.5, step=0.05, interactive=False, visible=False)
266
  temperature = gr.Slider(minimum=0, maximum=5.0, value=0.1, step=0.1, interactive=False, visible=False)
267
  chat_counter = gr.Number(value=0, visible=False, precision=0)
268
 
269
- # Hem Enter hem de Gönder butonuna basıldığında predict çalışıyor.
270
  inputs.submit(predict, [system_msg, inputs, top_p, temperature, chat_counter, chatbot, state], [chatbot, state, chat_counter])
271
  inputs.submit(reset_textbox, [], [inputs])
272
  send_button.click(predict, [system_msg, inputs, top_p, temperature, chat_counter, chatbot, state], [chatbot, state, chat_counter])
273
- send_button.click(reset_textbox, [], [inputs])
274
 
275
  demo.queue(max_size=10).launch(debug=True)
 
256
  show_label=False,
257
  container=False,
258
  )
259
+ with gr.Column(elem_classes="fixed_button_container"):
260
+ send_button = gr.Button(value="Gönder", elem_id="send_button")
261
 
262
  state = gr.State([])
263
 
264
+ with gr.Accordion("", open=False, visible=False):
265
  top_p = gr.Slider(minimum=0, maximum=1.0, value=0.5, step=0.05, interactive=False, visible=False)
266
  temperature = gr.Slider(minimum=0, maximum=5.0, value=0.1, step=0.1, interactive=False, visible=False)
267
  chat_counter = gr.Number(value=0, visible=False, precision=0)
268
 
 
269
  inputs.submit(predict, [system_msg, inputs, top_p, temperature, chat_counter, chatbot, state], [chatbot, state, chat_counter])
270
  inputs.submit(reset_textbox, [], [inputs])
271
  send_button.click(predict, [system_msg, inputs, top_p, temperature, chat_counter, chatbot, state], [chatbot, state, chat_counter])
 
272
 
273
  demo.queue(max_size=10).launch(debug=True)