Spaces:
Runtime error
Runtime error
Download frontend.py from NLPChatBotTeam/ChatBot-NLP: direct link, hf CLI and curl.
- Browser
- Download file 480 Bytes
-
https://huggingface.co/spaces/NLPChatBotTeam/ChatBot-NLP/resolve/cf4955cd8bcdfbc9ef35e2980e0f27997f86f700/frontend.py
- Command line
-
hf download hf://spaces/NLPChatBotTeam/ChatBot-NLP@cf4955cd8bcdfbc9ef35e2980e0f27997f86f700/frontend.py
-
curl -L -o frontend.py https://huggingface.co/spaces/NLPChatBotTeam/ChatBot-NLP/resolve/cf4955cd8bcdfbc9ef35e2980e0f27997f86f700/frontend.py
480 Bytes
| # frontend.py | |
| import gradio as gr | |
| from backend import responder_pregunta | |
| demo = gr.Interface( | |
| fn=responder_pregunta, | |
| inputs=gr.Textbox(placeholder="Haz una pregunta sobre la Batalla de Ayacucho"), | |
| outputs="text", | |
| title="🤖 ChatBot Ayacucho", | |
| description="Asistente histórico sobre la Batalla de Ayacucho", | |
| examples=[ | |
| ["¿Qué fue la Batalla de Ayacucho?"], | |
| ["¿Quién ganó la batalla?"], | |
| ["¿Qué consecuencias tuvo?"], | |
| ] | |
| ) |