Spaces:
Sleeping
Sleeping
File size: 869 Bytes
7053209 127b728 bb23a87 04bde91 127b728 0948738 127b728 0948738 127b728 73432f0 127b728 4ab43b4 f985285 179bd30 f985285 127b728 4ab43b4 127b728 4ab43b4 |
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_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}") |