Spaces:
Runtime error
Runtime error
Commit
·
8d96e4a
1
Parent(s):
9aebe2a
update
Browse files
app.py
CHANGED
@@ -87,7 +87,8 @@ def get_col(example):
|
|
87 |
instance_values[len(left_side_columns):]) # excluding the image & designer
|
88 |
for key, value in zip(right_side_columns, instance_values[len(left_side_columns):]):
|
89 |
label = key.capitalize().replace("_", " ")
|
90 |
-
|
|
|
91 |
text_inputs_right.append(text_input_k)
|
92 |
return inputs_left, text_inputs_right
|
93 |
|
|
|
87 |
instance_values[len(left_side_columns):]) # excluding the image & designer
|
88 |
for key, value in zip(right_side_columns, instance_values[len(left_side_columns):]):
|
89 |
label = key.capitalize().replace("_", " ")
|
90 |
+
num_lines = max(1, len(value) // 50 + (len(value) % 50 > 0)) # Assuming ~50 chars per line
|
91 |
+
text_input_k = gr.Textbox(value=value, label=f"{label} {emoji_to_label[key]}", lines=num_lines)
|
92 |
text_inputs_right.append(text_input_k)
|
93 |
return inputs_left, text_inputs_right
|
94 |
|