Spaces:
Sleeping
Sleeping
Ryan
commited on
Commit
·
4b11d86
1
Parent(s):
30bc4e7
update
Browse files- ui/analysis_screen.py +8 -1
ui/analysis_screen.py
CHANGED
@@ -359,11 +359,18 @@ def process_analysis_request(dataset, selected_analysis, parameters):
|
|
359 |
|
360 |
# Process based on the selected analysis type
|
361 |
if selected_analysis == "Bag of Words":
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
362 |
# Perform Bag of Words analysis using the processor
|
363 |
bow_results = compare_bow(
|
364 |
[model1_response, model2_response],
|
365 |
[model1_name, model2_name],
|
366 |
-
top_n=
|
367 |
)
|
368 |
results["analyses"][prompt_text]["bag_of_words"] = bow_results
|
369 |
|
|
|
359 |
|
360 |
# Process based on the selected analysis type
|
361 |
if selected_analysis == "Bag of Words":
|
362 |
+
# Get the top_n parameter and ensure it's an integer
|
363 |
+
top_n = parameters.get("bow_top", 25)
|
364 |
+
if isinstance(top_n, str):
|
365 |
+
top_n = int(top_n)
|
366 |
+
|
367 |
+
print(f"Using top_n value: {top_n}") # Debug print
|
368 |
+
|
369 |
# Perform Bag of Words analysis using the processor
|
370 |
bow_results = compare_bow(
|
371 |
[model1_response, model2_response],
|
372 |
[model1_name, model2_name],
|
373 |
+
top_n=top_n
|
374 |
)
|
375 |
results["analyses"][prompt_text]["bag_of_words"] = bow_results
|
376 |
|