dar-tau commited on
Commit
11f2e9c
1 Parent(s): 9d22b6e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -129,10 +129,10 @@ def run_interpretation(raw_original_prompt, raw_interpretation_prompt, max_new_t
129
  **generation_kwargs)
130
  generation_texts = tokenizer.batch_decode(generated)
131
  progress_dummy_output = ''
132
- elem_classes = [['bubble', 'even_bubble' if i % 2 == 0 else 'odd_bubble'] + (['faded'] if True else []) for i in range(len(generation_texts))]
133
  bubble_outputs = [gr.Textbox(text.replace('\n', ' '), show_label=True, visible=True,
134
  container=False, label=f'Layer {i}', elem_classes=elem_classes[i])
135
- for text in generation_texts]
136
  bubble_outputs += [gr.Textbox('', visible=False) for _ in range(MAX_NUM_LAYERS - len(bubble_outputs))]
137
  return [progress_dummy_output, *bubble_outputs]
138
 
 
129
  **generation_kwargs)
130
  generation_texts = tokenizer.batch_decode(generated)
131
  progress_dummy_output = ''
132
+ elem_classes = [['bubble', 'even_bubble' if i % 2 == 0 else 'odd_bubble'] + (['faded_bubble'] if True else []) for i in range(len(generation_texts))]
133
  bubble_outputs = [gr.Textbox(text.replace('\n', ' '), show_label=True, visible=True,
134
  container=False, label=f'Layer {i}', elem_classes=elem_classes[i])
135
+ for i, text in enumerate(generation_texts)]
136
  bubble_outputs += [gr.Textbox('', visible=False) for _ in range(MAX_NUM_LAYERS - len(bubble_outputs))]
137
  return [progress_dummy_output, *bubble_outputs]
138