Spaces:
Sleeping
Sleeping
Ryan
commited on
Commit
·
fc52d23
1
Parent(s):
e4798a1
update
Browse files- ui/analysis_screen.py +4 -2
ui/analysis_screen.py
CHANGED
@@ -377,11 +377,13 @@ def process_analysis_request(dataset, selected_analysis, parameters):
|
|
377 |
if isinstance(top_n, str):
|
378 |
top_n = int(top_n)
|
379 |
|
380 |
-
# Use the processor
|
381 |
-
|
|
|
382 |
[model1_response, model2_response],
|
383 |
[model1_name, model2_name],
|
384 |
n=ngram_size,
|
|
|
385 |
)
|
386 |
results["analyses"][prompt_text]["ngram_analysis"] = ngram_results
|
387 |
|
|
|
377 |
if isinstance(top_n, str):
|
378 |
top_n = int(top_n)
|
379 |
|
380 |
+
# Use the processor from the dedicated ngram_analysis module
|
381 |
+
from processors.ngram_analysis import compare_ngrams as ngram_processor
|
382 |
+
ngram_results = ngram_processor(
|
383 |
[model1_response, model2_response],
|
384 |
[model1_name, model2_name],
|
385 |
n=ngram_size,
|
386 |
+
top_n=top_n
|
387 |
)
|
388 |
results["analyses"][prompt_text]["ngram_analysis"] = ngram_results
|
389 |
|