Spaces:
Sleeping
Sleeping
import os | |
import logging | |
from utils.chatbot_interface4 import ChatbotInterface | |
# from utils.session_history2 import ChatbotInterface | |
# Configure logging to the console | |
logging.basicConfig( | |
level=logging.INFO, | |
format="%(asctime)s - %(levelname)s - %(message)s", | |
handlers=[ | |
logging.StreamHandler() | |
] | |
) | |
if __name__ == "__main__": | |
try: | |
# Instantiate the ChatbotInterface class and create the interface | |
chatbot_interface = ChatbotInterface( | |
model="gpt-4o-mini", | |
temperature=0, | |
max_output_tokens=600, | |
max_num_results=5 | |
) | |
demo = chatbot_interface.create_interface() | |
# Launch the Gradio interface | |
logging.info("Launching the Gradio interface...") | |
demo.launch() | |
except Exception as e: | |
logging.error(f"An error occurred: {e}") |