Spaces:
Build error
Build error
File size: 814 Bytes
deee4c9 5fc62e2 deee4c9 3737f46 deee4c9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | import os
import logging
from utils.chatbot_interface 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-4.1-nano",
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}") |