Download app.py from fdbw/RAGbot: direct link, hf CLI and curl.
- Browser
- Download file 300 Bytes
-
https://huggingface.co/spaces/fdbw/RAGbot/resolve/main/app.py
- Command line
-
hf download hf://spaces/fdbw/RAGbot/app.py
-
curl -L -o app.py https://huggingface.co/spaces/fdbw/RAGbot/resolve/main/app.py
300 Bytes
| import gradio as gr | |
| from rag import ask | |
| with gr.Blocks() as demo: | |
| gr.Markdown("# 冯氏家谱 RAG 机器人") | |
| q = gr.Textbox(label="请输入问题,例如:冯宗德的儿子是谁") | |
| a = gr.Textbox(label="回答") | |
| btn = gr.Button("查询") | |
| btn.click(ask, q, a) | |
| demo.launch() | |