# app.py import os import gradio as gr from pipeline import run_with_chain def ask_dailywellness(query: str) -> str: """ Calls our main pipeline function from pipeline.py """ return run_with_chain(query) # Build a simple Gradio interface interface = gr.Interface( fn=ask_dailywellness, inputs=gr.Textbox( lines=2, label="Ask DailyWellnessAI", placeholder="e.g., How do I improve my posture while working?" ), outputs=gr.Textbox( label="DailyWellnessAI Answer" ), title="DailyWellnessAI Chat", description=( "Ask a wellness question, or something about DailyWellnessAI (brand). " "If the question is out of scope, you'll get a polite refusal." ), allow_flagging="never" ) if __name__ == "__main__": interface.launch(server_name="0.0.0.0", server_port=7860)