Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -114,10 +114,7 @@ def process_input_gradio(problem_description: str):
|
|
| 114 |
|
| 115 |
return (
|
| 116 |
prompt,
|
| 117 |
-
"
|
| 118 |
-
", ".join([f'{item["title"]}: {item["description"]}' for item in constraints_stemmed]),
|
| 119 |
-
"Global technologies loaded and ready.", # Acknowledge tech loading
|
| 120 |
-
str(result_similarities_display), # Convert dict to string for display
|
| 121 |
best_combinations_display,
|
| 122 |
", ".join(map(str, best_technologies_id)),
|
| 123 |
best_technologies_display
|
|
@@ -133,9 +130,6 @@ input_problem = gr.Textbox(
|
|
| 133 |
|
| 134 |
output_prompt = gr.Textbox(label="1. Generated Prompt", interactive=False)
|
| 135 |
output_constraints = gr.Textbox(label="2. Retrieved Constraints", interactive=False)
|
| 136 |
-
output_stemmed_constraints = gr.Textbox(label="3. Stemmed Constraints", interactive=False)
|
| 137 |
-
output_tech_loaded = gr.Textbox(label="4. Global Technologies Status", interactive=False)
|
| 138 |
-
output_similarities = gr.Textbox(label="5. Result Similarities (Constraint -> Top Technologies)", interactive=False)
|
| 139 |
output_best_combinations = gr.JSON(label="7. Best Technology Combinations Found")
|
| 140 |
output_selected_ids = gr.Textbox(label="8. Selected Technology IDs", interactive=False)
|
| 141 |
output_final_technologies = gr.JSON(label="9. Final Best Technologies")
|
|
@@ -150,9 +144,6 @@ with gr.Blocks() as gradio_app_blocks:
|
|
| 150 |
with gr.Column():
|
| 151 |
output_prompt.render()
|
| 152 |
output_constraints.render()
|
| 153 |
-
output_stemmed_constraints.render()
|
| 154 |
-
output_tech_loaded.render()
|
| 155 |
-
output_similarities.render()
|
| 156 |
output_best_combinations.render()
|
| 157 |
output_selected_ids.render()
|
| 158 |
output_final_technologies.render()
|
|
@@ -163,9 +154,6 @@ with gr.Blocks() as gradio_app_blocks:
|
|
| 163 |
outputs=[
|
| 164 |
output_prompt,
|
| 165 |
output_constraints,
|
| 166 |
-
output_stemmed_constraints,
|
| 167 |
-
output_tech_loaded,
|
| 168 |
-
output_similarities,
|
| 169 |
output_best_combinations,
|
| 170 |
output_selected_ids,
|
| 171 |
output_final_technologies
|
|
|
|
| 114 |
|
| 115 |
return (
|
| 116 |
prompt,
|
| 117 |
+
"\n ".join(constraints),
|
|
|
|
|
|
|
|
|
|
| 118 |
best_combinations_display,
|
| 119 |
", ".join(map(str, best_technologies_id)),
|
| 120 |
best_technologies_display
|
|
|
|
| 130 |
|
| 131 |
output_prompt = gr.Textbox(label="1. Generated Prompt", interactive=False)
|
| 132 |
output_constraints = gr.Textbox(label="2. Retrieved Constraints", interactive=False)
|
|
|
|
|
|
|
|
|
|
| 133 |
output_best_combinations = gr.JSON(label="7. Best Technology Combinations Found")
|
| 134 |
output_selected_ids = gr.Textbox(label="8. Selected Technology IDs", interactive=False)
|
| 135 |
output_final_technologies = gr.JSON(label="9. Final Best Technologies")
|
|
|
|
| 144 |
with gr.Column():
|
| 145 |
output_prompt.render()
|
| 146 |
output_constraints.render()
|
|
|
|
|
|
|
|
|
|
| 147 |
output_best_combinations.render()
|
| 148 |
output_selected_ids.render()
|
| 149 |
output_final_technologies.render()
|
|
|
|
| 154 |
outputs=[
|
| 155 |
output_prompt,
|
| 156 |
output_constraints,
|
|
|
|
|
|
|
|
|
|
| 157 |
output_best_combinations,
|
| 158 |
output_selected_ids,
|
| 159 |
output_final_technologies
|