Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -412,14 +412,14 @@ def create_project_proposals(budget_cluster_df, problem_cluster_df, location_clu
|
|
| 412 |
print("problem_domain: ",problem_domain)
|
| 413 |
print("problem_descriptions: ",problem_descriptions)
|
| 414 |
|
| 415 |
-
if problem_descriptions and not pd.isna(problem_descriptions):
|
| 416 |
|
| 417 |
print(f"\nGenerating proposal for location: {location}, problem domain: {problem_domain}")
|
| 418 |
|
| 419 |
# console_messages.append(f"\nGenerating proposal for location: {location}, problem domain: {problem_domain}")
|
| 420 |
|
| 421 |
# Prepare the prompt
|
| 422 |
-
problems_summary = "; ".join(problem_descriptions[:3]) # Limit to first 3 for brevity
|
| 423 |
# problems_summary = "; ".join(problem_descriptions)
|
| 424 |
# prompt = f"Generate a project proposal for the following:\n\nLocation: {location}\nProblem Domain: {problem_domain}\nProblems: {problems_summary}\nBudget: ${financial_weight:.2f}\n\nProject Proposal:"
|
| 425 |
prompt = f"Generate a solution oriented project proposal for the following:\n\nLocation: {location}\nProblem Domain: {problem_domain}\nProblems: {problems_summary}\n\nProject Proposal:"
|
|
|
|
| 412 |
print("problem_domain: ",problem_domain)
|
| 413 |
print("problem_descriptions: ",problem_descriptions)
|
| 414 |
|
| 415 |
+
if problem_descriptions:# and not pd.isna(problem_descriptions):
|
| 416 |
|
| 417 |
print(f"\nGenerating proposal for location: {location}, problem domain: {problem_domain}")
|
| 418 |
|
| 419 |
# console_messages.append(f"\nGenerating proposal for location: {location}, problem domain: {problem_domain}")
|
| 420 |
|
| 421 |
# Prepare the prompt
|
| 422 |
+
problems_summary = "; \n".join(problem_descriptions[:3]) # Limit to first 3 for brevity
|
| 423 |
# problems_summary = "; ".join(problem_descriptions)
|
| 424 |
# prompt = f"Generate a project proposal for the following:\n\nLocation: {location}\nProblem Domain: {problem_domain}\nProblems: {problems_summary}\nBudget: ${financial_weight:.2f}\n\nProject Proposal:"
|
| 425 |
prompt = f"Generate a solution oriented project proposal for the following:\n\nLocation: {location}\nProblem Domain: {problem_domain}\nProblems: {problems_summary}\n\nProject Proposal:"
|