Spaces:
Runtime error
Runtime error
Commit
·
5dab160
1
Parent(s):
61842a4
fix attrib_dicts
Browse files
app.py
CHANGED
@@ -208,7 +208,7 @@ def main(text):
|
|
208 |
|
209 |
prediction_idx = set(i for i, c in enumerate(restoration.input_text) if c == '?')
|
210 |
|
211 |
-
attrib_dict = {get_subregion_name(l.location_id, region_map): l.score for l in attribution[3]}
|
212 |
return restore_template.render(
|
213 |
restoration_results=restoration,
|
214 |
prediction_idx=prediction_idx), attrib_dict
|
|
|
208 |
|
209 |
prediction_idx = set(i for i, c in enumerate(restoration.input_text) if c == '?')
|
210 |
|
211 |
+
attrib_dict = {get_subregion_name(l.location_id, region_map): l.score for l in attribution.locations[:3]}
|
212 |
return restore_template.render(
|
213 |
restoration_results=restoration,
|
214 |
prediction_idx=prediction_idx), attrib_dict
|