Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -43,14 +43,16 @@ iface = gr.Interface(
|
|
43 |
theme="compact",
|
44 |
)
|
45 |
|
46 |
-
iface.inputs[0].
|
47 |
iface.inputs[0].type = "text"
|
48 |
-
iface.
|
49 |
-
iface.
|
|
|
50 |
|
51 |
-
iface.inputs[1].
|
52 |
iface.inputs[1].type = "text"
|
53 |
-
iface.
|
54 |
-
iface.
|
|
|
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()
|