Spaces:
Runtime error
Runtime error
levisstrauss commited on
Commit Β·
4e9e142
1
Parent(s): 86d7056
Fix alignment
Browse files864 unmodified lines865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937864 unmodified lineslen([line for line in tasks.split('\n') if "task id" in line.lower()]))# Build the plan documentplan = f"""# π Project Plan**Generated:** {datetime.now().strftime("%Y-%m-%d %H:%M")}---## π Summary Statistics| Metric | Count ||--------|-------|| User Stories | {self.stats['user_stories']} || Product Features | {self.stats['features']} || Engineering Tasks | {self.stats['tasks']} || Evaluation Iterations | {self.stats['iterations']} |---## π€ User Stories{user_stories}---## π¦ Product Features{features}---## π§ Engineering Tasks{tasks}---## π Workflow Log| Time | Level | Message ||------|-------|---------|"""# Add each log entry as a proper table rowfor log_entry in self.workflow_log:# Escape pipe characters in message to prevent table breakingmessage = log_entry['message'].replace('|', '\\|')plan += f"| {log_entry['timestamp']} | {log_entry['level']} | {message} |\n"# Add footerplan += """---## β Next Steps1. Review and prioritize the user stories with stakeholders2. Validate feature groupings with the product team3. Estimate engineering tasks with the development team4. Create sprint plan based on dependencies5. Set up project tracking in your preferred tool (Jira, Linear, etc.)---*Generated by AI Project Planner | Powered by GPT-3.5*"""return plan# ============================================================================# GRADIO INTERFACE864 unmodified lines865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936864 unmodified lineslen([line for line in tasks.split('\n') if "task id" in line.lower()]))# Build workflow log table rows firstlog_rows = []for log_entry in self.workflow_log:message = log_entry['message'].replace('|', '-')log_rows.append(f"| {log_entry['timestamp']} | {log_entry['level']} | {message} |")workflow_log_table = "\n".join(log_rows)# Build the plan document - NO INDENTATION in the stringplan = f"""# π Project Plan**Generated:** {datetime.now().strftime("%Y-%m-%d %H:%M")}---## π Summary Statistics| Metric | Count ||--------|-------|| User Stories | {self.stats['user_stories']} || Product Features | {self.stats['features']} || Engineering Tasks | {self.stats['tasks']} || Evaluation Iterations | {self.stats['iterations']} |---## π€ User Stories{user_stories}---## π¦ Product Features{features}---## π§ Engineering Tasks{tasks}---## π Workflow Log| Time | Level | Message ||------|-------|---------|{workflow_log_table}---## β Next Steps1. Review and prioritize the user stories with stakeholders2. Validate feature groupings with the product team3. Estimate engineering tasks with the development team4. Create sprint plan based on dependencies5. Set up project tracking in your preferred tool (Jira, Linear, etc.)---*Generated by AI Project Planner | Powered by GPT-3.5*"""return plan# ============================================================================# GRADIO INTERFACE
app.py+59-60