ysharma HF staff commited on
Commit
3d98930
1 Parent(s): 7849cce

update button layout

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -152,7 +152,7 @@ def retry_last_answer(
152
 
153
  if chat and history:
154
  # Removing the previous conversation from chat
155
- chat.pop(-1)
156
  # Removing bot response from the history
157
  history.pop(-1)
158
  # Setting up a flag to capture a retry
@@ -202,9 +202,10 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
202
  container=False)
203
  RETRY_FLAG = gr.Checkbox(value=False, visible=False)
204
  with gr.Column(min_width=32, scale=1):
205
- submitBtn = gr.Button("Submit", variant="primary")
206
- deleteBtn = gr.Button("Delete last turn", variant="secondary")
207
- retryBtn = gr.Button("Regenerate", variant="secondary")
 
208
  with gr.Column(scale=1):
209
  emptyBtn = gr.Button("Clear History")
210
  max_length = gr.Slider(0, 32768, value=8192/2, step=1.0, label="Maximum length", interactive=True)
 
152
 
153
  if chat and history:
154
  # Removing the previous conversation from chat
155
+ chatbot.pop(-1)
156
  # Removing bot response from the history
157
  history.pop(-1)
158
  # Setting up a flag to capture a retry
 
202
  container=False)
203
  RETRY_FLAG = gr.Checkbox(value=False, visible=False)
204
  with gr.Column(min_width=32, scale=1):
205
+ with gr.Row():
206
+ submitBtn = gr.Button("Submit", variant="primary")
207
+ deleteBtn = gr.Button("Delete last turn", variant="secondary")
208
+ retryBtn = gr.Button("Regenerate", variant="secondary")
209
  with gr.Column(scale=1):
210
  emptyBtn = gr.Button("Clear History")
211
  max_length = gr.Slider(0, 32768, value=8192/2, step=1.0, label="Maximum length", interactive=True)