Spaces:
Sleeping
Sleeping
| import warnings | |
| from dotenv import load_dotenv | |
| # Load environment variables from .env file | |
| load_dotenv() | |
| # Import handlers and UI creator from modules | |
| from prediction import single_prediction | |
| from chatbot import process_chatbot_query_with_llm | |
| from ui import create_ui | |
| if __name__ == "__main__": | |
| # Suppress warnings for a cleaner output | |
| warnings.filterwarnings('ignore') | |
| # Create the Gradio UI by passing the handlers to the UI generator | |
| demo = create_ui( | |
| prediction_handler=single_prediction, | |
| chatbot_handler=process_chatbot_query_with_llm | |
| ) | |
| # Launch the application | |
| demo.launch(share=True) |