gloignon commited on
Commit
936a5e6
·
verified ·
1 Parent(s): 85e8945

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -67,11 +67,15 @@ def text_editor_app():
67
  # Initialize with default boxes
68
  initialize_default_boxes()
69
 
 
 
 
70
  # Column to hold all input boxes
71
  with gr.Column() as input_container:
72
  for identifier, text in zip(identifier_boxes, text_boxes):
73
  identifier.render()
74
  text.render()
 
75
 
76
  # Button to add more text input pairs
77
  add_button = gr.Button("Add Another Text")
@@ -102,4 +106,4 @@ def text_editor_app():
102
  return demo
103
 
104
  # Launch the app
105
- text_editor_app().launch()
 
67
  # Initialize with default boxes
68
  initialize_default_boxes()
69
 
70
+ # Counter to keep track of the number of components rendered so far
71
+ counter = 0
72
+
73
  # Column to hold all input boxes
74
  with gr.Column() as input_container:
75
  for identifier, text in zip(identifier_boxes, text_boxes):
76
  identifier.render()
77
  text.render()
78
+ counter += 1
79
 
80
  # Button to add more text input pairs
81
  add_button = gr.Button("Add Another Text")
 
106
  return demo
107
 
108
  # Launch the app
109
+ text_editor_app().launch()