Spaces:
Runtime error
Runtime error
File size: 858 Bytes
b03d3b6 af2f6b5 b03d3b6 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
from src.services.utils import *
from src.services.processor import *
def process_input(data):
prompt = set_prompt(data.problem)
constraints = retrieve_constraints(prompt)
constraints_stemmed = stem(constraints, "constraints")
save_dataframe(constraints_stemmed, "constraints_stemmed.xlsx")
df = load_technologies()
global_tech, keys, original_tech = preprocess_tech_data(df)
save_dataframe(global_tech, "global_tech.xlsx")
result_similarities, matrix = get_contrastive_similarities(global_tech, constraints_stemmed)
save_to_pickle(result_similarities)
best_combinations = find_best_list_combinations(constraints_stemmed,global_tech, matrix)
best_technologies_id = select_technologies(best_combinations)
best_technologies = get_technologies_by_id(best_technologies_id,global_tech)
return best_technologies |