rdune71 commited on
Commit
882318e
·
verified ·
1 Parent(s): d9b82f1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -2
app.py CHANGED
@@ -55,7 +55,13 @@ class ResearchOrchestrator:
55
  formatted_output = self.formatter.format_response(cited_analysis, search_results)
56
  logging.info("Response formatted successfully")
57
 
58
- yield formatted_output
 
 
 
 
 
 
59
 
60
  except Exception as e:
61
  error_msg = f"❌ An error occurred: {str(e)}"
@@ -144,4 +150,5 @@ with gr.Blocks(title="Research Assistant") as demo:
144
  )
145
 
146
  if __name__ == "__main__":
147
- demo.launch()
 
 
55
  formatted_output = self.formatter.format_response(cited_analysis, search_results)
56
  logging.info("Response formatted successfully")
57
 
58
+ # Add completion notification
59
+ if len(search_results) >= 3:
60
+ completion_message = "\n\n---\n[ANALYSIS COMPLETE] ✅ Research finished with sufficient sources."
61
+ else:
62
+ completion_message = "\n\n---\n[RECOMMEND FURTHER ANALYSIS] ⚠️ Limited sources found. Consider refining your query."
63
+
64
+ yield formatted_output + completion_message
65
 
66
  except Exception as e:
67
  error_msg = f"❌ An error occurred: {str(e)}"
 
150
  )
151
 
152
  if __name__ == "__main__":
153
+ demo.launch()
154
+