Spaces:
Sleeping
Sleeping
| #!/usr/bin/env python3 | |
| """ | |
| Hugging Face Space app for Conversation Analysis Dashboard. | |
| This app displays conversation analysis results in a tabular format, | |
| showing insights, summaries, and follow-up emails for all conversations | |
| from the test_intercom_data collection. | |
| """ | |
| import os | |
| import sys | |
| from pathlib import Path | |
| # Add paths | |
| sys.path.append('.') | |
| sys.path.append('src') | |
| from second_brain_online.application.ui.conversation_analysis_ui import ConversationAnalysisUI | |
| def main(): | |
| """Main function for HF Space deployment.""" | |
| print("π Starting Conversation Analysis Dashboard...") | |
| print("π Loading conversation analysis data from MongoDB...") | |
| try: | |
| # Initialize UI | |
| ui = ConversationAnalysisUI() | |
| print("β UI initialized successfully") | |
| print("π Launching Gradio interface...") | |
| # Launch the interface | |
| ui.launch( | |
| server_name="0.0.0.0", | |
| server_port=7860, | |
| share=False, | |
| show_error=True | |
| ) | |
| except Exception as e: | |
| print(f"β Error starting the application: {e}") | |
| raise | |
| if __name__ == "__main__": | |
| main() | |