import gradio as gr from workflow import get_workflow from query import preprocess_query # Initialize the workflow chat_chain = get_workflow() def chatbot_function(user_input): """Handle user input for chatbot conversation and weather queries.""" processed_input = preprocess_query(user_input) return processed_input # Create a Gradio interface for the chatbot iface = gr.Interface(fn=chatbot_function, inputs="text", outputs="text", title="Streaming Chatbot with Weather Queries", description="Ask the bot about the weather or have a conversation.") # Launch the Gradio interface iface.launch(share=True)