DrishtiSharma commited on
Commit
8b7d8c5
Β·
verified Β·
1 Parent(s): 0772061

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -5
app.py CHANGED
@@ -444,11 +444,17 @@ def escape_markdown(text):
444
 
445
 
446
  # Functions with Progress Bar Updates
447
- def generate_report(query, crew_report, result_container, progress_bar, step):
448
- progress_bar.progress(step, text="πŸ“ Generating Analysis Report...")
449
- report_inputs = {"query": query + " Provide detailed analysis but DO NOT include Conclusion."}
450
- result_container['report'] = crew_report.kickoff(inputs=report_inputs)
451
- progress_bar.progress(step + 1, text="βœ… Analysis Report Ready!")
 
 
 
 
 
 
452
 
453
  def generate_conclusion(query, crew_conclusion, result_container, progress_bar, step):
454
  progress_bar.progress(step, text="πŸ“ Crafting Conclusion...")
 
444
 
445
 
446
  # Functions with Progress Bar Updates
447
+ def generate_report():
448
+ try:
449
+ progress_bar.progress(20, text="πŸ“ Generating Analysis Report...")
450
+ report_inputs = {"query": query + " Provide detailed analysis but DO NOT include Conclusion."}
451
+ result_container['report'] = crew_report.kickoff(inputs=report_inputs)
452
+ if not result_container['report']:
453
+ st.warning("⚠️ Report generation failed.")
454
+ progress_bar.progress(40, text="βœ… Analysis Report Ready!")
455
+ except Exception as e:
456
+ st.error(f"❌ Report generation error: {e}")
457
+
458
 
459
  def generate_conclusion(query, crew_conclusion, result_container, progress_bar, step):
460
  progress_bar.progress(step, text="πŸ“ Crafting Conclusion...")