Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -56,13 +56,13 @@ def process_input_gradio(problem_description: str):
|
|
56 |
save_to_pickle(result_similarities)
|
57 |
|
58 |
# Step 6: Find Best List Combinations
|
59 |
-
best_combinations = find_best_list_combinations(constraints_stemmed,
|
60 |
|
61 |
# Step 7: Select Technologies
|
62 |
best_technologies_id = select_technologies(best_combinations)
|
63 |
|
64 |
# Step 8: Get Technologies by ID
|
65 |
-
best_technologies = get_technologies_by_id(best_technologies_id,
|
66 |
|
67 |
# Format outputs for Gradio
|
68 |
matrix_display = matrix.tolist() # Convert numpy array to list of lists for better Gradio display
|
@@ -81,7 +81,7 @@ def process_input_gradio(problem_description: str):
|
|
81 |
", ".join(constraints_stemmed),
|
82 |
"Global technologies loaded and ready.", # Acknowledge tech loading
|
83 |
str(result_similarities_display), # Convert dict to string for display
|
84 |
-
pd.DataFrame(matrix_display, index=constraints_stemmed, columns=
|
85 |
best_combinations_display,
|
86 |
", ".join(map(str, best_technologies_id)),
|
87 |
best_technologies_display
|
|
|
56 |
save_to_pickle(result_similarities)
|
57 |
|
58 |
# Step 6: Find Best List Combinations
|
59 |
+
best_combinations = find_best_list_combinations(constraints_stemmed, global_tech, matrix)
|
60 |
|
61 |
# Step 7: Select Technologies
|
62 |
best_technologies_id = select_technologies(best_combinations)
|
63 |
|
64 |
# Step 8: Get Technologies by ID
|
65 |
+
best_technologies = get_technologies_by_id(best_technologies_id, global_tech)
|
66 |
|
67 |
# Format outputs for Gradio
|
68 |
matrix_display = matrix.tolist() # Convert numpy array to list of lists for better Gradio display
|
|
|
81 |
", ".join(constraints_stemmed),
|
82 |
"Global technologies loaded and ready.", # Acknowledge tech loading
|
83 |
str(result_similarities_display), # Convert dict to string for display
|
84 |
+
pd.DataFrame(matrix_display, index=constraints_stemmed, columns=global_tech['name']), # Display matrix as DataFrame
|
85 |
best_combinations_display,
|
86 |
", ".join(map(str, best_technologies_id)),
|
87 |
best_technologies_display
|