Spaces:
Runtime error
Runtime error
Download app.py from aditag/RAG_ChatBot_NoQs: direct link, hf CLI and curl.
- Browser
- Download file 786 Bytes
-
https://huggingface.co/spaces/aditag/RAG_ChatBot_NoQs/resolve/main/app.py
- Command line
-
hf download hf://spaces/aditag/RAG_ChatBot_NoQs/app.py
-
curl -L -o app.py https://huggingface.co/spaces/aditag/RAG_ChatBot_NoQs/resolve/main/app.py
786 Bytes
| from dependencies import * | |
| from chatbot import ChatBot | |
| bot = ChatBot(data_change=False) | |
| def chat_function(prompts,history): | |
| user_input = prompts | |
| result = bot.rag_chain.invoke(user_input) | |
| return result | |
| iface = gr.ChatInterface( | |
| fn=chat_function, | |
| textbox = gr.Textbox(placeholder="Enter message here", container=False, scale = 7), | |
| chatbot= gr.Chatbot(height=400), | |
| title="NoQs Chatbot", | |
| examples=[ | |
| ["Hello, What are the Internship oportunities at NoQs?"], | |
| ["Why should I work at NoQs"], | |
| ["How do I contact you?"], | |
| ["Can I schedule a meet with Mr. Adit?"], | |
| ["Can you provide me the Internship Repository and other important links"], | |
| ["Tell me the difference between your programs"] | |
| ] | |
| ) | |
| iface.launch() | |