Rooni commited on
Commit
c5efbfb
·
1 Parent(s): fa7cecd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -6
app.py CHANGED
@@ -43,14 +43,16 @@ iface = gr.Interface(
43
  theme="compact",
44
  )
45
 
46
- iface.inputs[0].label = "Удалить сообщение (индекс):"
47
  iface.inputs[0].type = "text"
48
- iface.buttons[0].label = "Удалить"
49
- iface.buttons[0].onclick(lambda delete_index: delete_message(iface.data.input_message, int(delete_index)))
 
50
 
51
- iface.inputs[1].label = "Изменить сообщение (индекс, новое сообщение):"
52
  iface.inputs[1].type = "text"
53
- iface.buttons[1].label = "Изменить"
54
- iface.buttons[1].onclick(lambda edit_params: edit_message(iface.data.input_message, *map(str.strip, edit_params.split(','))))
 
55
 
56
  iface.launch()
 
43
  theme="compact",
44
  )
45
 
46
+ iface.inputs[0].placeholder = "Удалить сообщение (индекс):"
47
  iface.inputs[0].type = "text"
48
+ iface.inputs[0].label = "Удалить сообщение (индекс):"
49
+ iface.inputs[0].live = True
50
+ iface.inputs[0].actions = lambda delete_index: delete_message(iface.data.input_message, int(delete_index))
51
 
52
+ iface.inputs[1].placeholder = "Изменить сообщение (индекс, новое сообщение):"
53
  iface.inputs[1].type = "text"
54
+ iface.inputs[1].label = "Изменить сообщение (индекс, новое сообщение):"
55
+ iface.inputs[1].live = True
56
+ iface.inputs[1].actions = lambda edit_params: edit_message(iface.data.input_message, *map(str.strip, edit_params.split(',')))
57
 
58
  iface.launch()