Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -91,7 +91,14 @@ def get_col(example):
|
|
| 91 |
instance_values[len(left_side_columns):]) # excluding the image & designer
|
| 92 |
for key, value in zip(right_side_columns, instance_values[len(left_side_columns):]):
|
| 93 |
label = key.capitalize().replace("_", " ")
|
| 94 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 95 |
text_inputs_right.append(text_input_k)
|
| 96 |
return inputs_left, text_inputs_right
|
| 97 |
|
|
|
|
| 91 |
instance_values[len(left_side_columns):]) # excluding the image & designer
|
| 92 |
for key, value in zip(right_side_columns, instance_values[len(left_side_columns):]):
|
| 93 |
label = key.capitalize().replace("_", " ")
|
| 94 |
+
|
| 95 |
+
if type(value) != str:
|
| 96 |
+
num_lines = 1
|
| 97 |
+
else:
|
| 98 |
+
num_lines = max(1, len(value) // 50 + (len(value) % 45 > 0)) # Assuming ~50 chars per line
|
| 99 |
+
|
| 100 |
+
text_input_k = gr.Textbox(value=value, label=f"{label} {emoji_to_label[key]}", lines=num_lines)
|
| 101 |
+
# text_input_k = gr.Textbox(value=value, label=f"{label} {emoji_to_label[key]}")
|
| 102 |
text_inputs_right.append(text_input_k)
|
| 103 |
return inputs_left, text_inputs_right
|
| 104 |
|