Spaces:
Sleeping
Sleeping
Download src/app.py from hinogi/cv-chatbot: direct link, hf CLI and curl.
- Browser
- Download file 790 Bytes
-
https://huggingface.co/spaces/hinogi/cv-chatbot/resolve/main/src/app.py
- Command line
-
hf download hf://spaces/hinogi/cv-chatbot/src/app.py
-
curl -L -o app.py https://huggingface.co/spaces/hinogi/cv-chatbot/resolve/main/src/app.py
790 Bytes
| from rag import query, load_vectorstore | |
| import gradio as gr | |
| vectorstore = load_vectorstore() | |
| STARTER_QUESTIONS = [ | |
| "Welche Architekturerfahrung bringt Stefan mit?", | |
| "Warum bewirbt sich Stefan als Staff Engineer?", | |
| "Was hat Stefan bei der PVS konkret gemacht?", | |
| "Welche KI-Kenntnisse hat Stefan?", | |
| ] | |
| def chat(message: str, history: list): | |
| response = query(message, history, vectorstore) | |
| return response | |
| with gr.Blocks(title="Stefan Schneider - Bewerbungs Chatbot") as demo: | |
| gr.Markdown("# Stefan Schneider - Ama") | |
| gr.Markdown("Frag mich zu meinem beruflichen Profil") | |
| chatbot = gr.ChatInterface( | |
| fn=chat, examples=STARTER_QUESTIONS, cache_examples=False | |
| ) | |
| if __name__ == "__main__": | |
| demo.launch(server_name="0.0.0.0", share=True) | |