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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -14
app.py CHANGED
@@ -37,22 +37,10 @@ def edit_message(messages, index, new_message):
37
 
38
  iface = gr.Interface(
39
  fn=generate_response,
40
- inputs=gr.Textbox("Введите сообщение:"),
41
- outputs=gr.Textbox(""),
42
  live=True,
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()
 
37
 
38
  iface = gr.Interface(
39
  fn=generate_response,
40
+ inputs="text",
41
+ outputs="text",
42
  live=True,
43
  theme="compact",
44
  )
45
 
 
 
 
 
 
 
 
 
 
 
 
 
46
  iface.launch()