Spaces:
Runtime error
Runtime error
Fillna relevances with 0
Browse files
app.py
CHANGED
@@ -101,7 +101,7 @@ def generate_heatmap(input_tokens, all_relevances, output_tokens):
|
|
101 |
|
102 |
def on_generate(input_text, num_tokens):
|
103 |
input_tokens, relevances, generated_text, generated_length, output_tokens = generate_and_visualize(input_text, num_tokens)
|
104 |
-
heatmap = generate_heatmap(input_tokens, relevances, output_tokens)
|
105 |
return (
|
106 |
input_tokens,
|
107 |
relevances,
|
|
|
101 |
|
102 |
def on_generate(input_text, num_tokens):
|
103 |
input_tokens, relevances, generated_text, generated_length, output_tokens = generate_and_visualize(input_text, num_tokens)
|
104 |
+
heatmap = generate_heatmap(input_tokens, relevances.fillna(0), output_tokens)
|
105 |
return (
|
106 |
input_tokens,
|
107 |
relevances,
|