Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -74,6 +74,7 @@ def process_input_gradio(problem_description: str):
|
|
| 74 |
# Step 3: Stem Constraints
|
| 75 |
constraints_stemmed = stem(constraints, "constraints")
|
| 76 |
save_dataframe(pd.DataFrame({"stemmed_constraints": constraints_stemmed}), "constraints_stemmed.xlsx")
|
|
|
|
| 77 |
|
| 78 |
# Step 4: Global Tech (already loaded, just acknowledge)
|
| 79 |
# save_dataframe(global_tech_df, "global_tech.xlsx") # This is already done implicitly by loading
|
|
@@ -96,8 +97,6 @@ def process_input_gradio(problem_description: str):
|
|
| 96 |
# Format outputs for Gradio
|
| 97 |
matrix_display = matrix #.tolist() # Convert numpy array to list of lists for better Gradio display
|
| 98 |
|
| 99 |
-
print(best_combinations)
|
| 100 |
-
|
| 101 |
result_similarities_display = {
|
| 102 |
item['id2']: f"{item['constraint']['title']} ({item['similarity'].item():.3f})"
|
| 103 |
for item in result_similarities
|
|
@@ -112,7 +111,6 @@ def process_input_gradio(problem_description: str):
|
|
| 112 |
best_combinations_display = json.dumps(safe_best_combinations, indent=2)
|
| 113 |
best_technologies_display = json.dumps(safe_best_technologies, indent=2)
|
| 114 |
|
| 115 |
-
print(f"constraints_stemmed : {constraints_stemmed}")
|
| 116 |
|
| 117 |
return (
|
| 118 |
prompt,
|
|
|
|
| 74 |
# Step 3: Stem Constraints
|
| 75 |
constraints_stemmed = stem(constraints, "constraints")
|
| 76 |
save_dataframe(pd.DataFrame({"stemmed_constraints": constraints_stemmed}), "constraints_stemmed.xlsx")
|
| 77 |
+
print(f"constraints_stemmed : {constraints_stemmed}")
|
| 78 |
|
| 79 |
# Step 4: Global Tech (already loaded, just acknowledge)
|
| 80 |
# save_dataframe(global_tech_df, "global_tech.xlsx") # This is already done implicitly by loading
|
|
|
|
| 97 |
# Format outputs for Gradio
|
| 98 |
matrix_display = matrix #.tolist() # Convert numpy array to list of lists for better Gradio display
|
| 99 |
|
|
|
|
|
|
|
| 100 |
result_similarities_display = {
|
| 101 |
item['id2']: f"{item['constraint']['title']} ({item['similarity'].item():.3f})"
|
| 102 |
for item in result_similarities
|
|
|
|
| 111 |
best_combinations_display = json.dumps(safe_best_combinations, indent=2)
|
| 112 |
best_technologies_display = json.dumps(safe_best_technologies, indent=2)
|
| 113 |
|
|
|
|
| 114 |
|
| 115 |
return (
|
| 116 |
prompt,
|