Spaces:
Sleeping
Sleeping
| import gradio as gr | |
| from rag_app import rag_answer | |
| def answer_fn(query: str): | |
| return rag_answer(query, k=2) | |
| demo = gr.Interface( | |
| fn=answer_fn, | |
| inputs=gr.Textbox( | |
| lines=2, | |
| label="Ask about regional news", | |
| placeholder="" | |
| ), | |
| outputs="text", | |
| title="Regional News RAG Chatbot", | |
| description="Retrieves BC/Canada news articles and summarizes them using extractive RAG." | |
| ) | |
| if __name__ == "__main__": | |
| demo.launch() | |