rishisim commited on
Commit
83db2f9
1 Parent(s): cef8e1c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -41,7 +41,7 @@ from langchain_core.prompts import ChatPromptTemplate
41
  prompt = ChatPromptTemplate.from_template("""Given the following context and a question, generate a complete and detailed answer with finished sentences based on the provided context only.
42
 
43
  In your answer, try to use as much text as possible from the "response" section in the source document context without making significant changes.
44
- If someone asks "Who are you?" or a similar question, reply with "I am Rishi's assistant built using a Large Language Model!"
45
  If the answer is not found in the context, kindly state "I don't know. Please ask Rishi on Discord at https://discord.gg/6ezpZGeCcM or email [email protected]." Do not attempt to make up an answer.
46
 
47
  CONTEXT: {context}
@@ -86,8 +86,8 @@ def chatresponse(message, history):
86
  gr.ChatInterface(
87
  chatresponse,
88
  textbox = gr.Textbox(placeholder="Type in your message"),
89
- title = "AIoT SMART Labs Assistant",
90
- description = "Ask AIoT SMART Labs Assistant any question about the organization or program. This chatbot is developed using a large language model.",
91
  examples = ["What is the IoT Summer Program?", "I'm a 9th grader. Am I eligible for the program?", "What are the dates for the online & live batches?"],
92
  theme = "base",
93
  ).launch()
 
41
  prompt = ChatPromptTemplate.from_template("""Given the following context and a question, generate a complete and detailed answer with finished sentences based on the provided context only.
42
 
43
  In your answer, try to use as much text as possible from the "response" section in the source document context without making significant changes.
44
+ If someone asks "Who are you?" or a similar question, reply with "My name is Chitti, a chatbot. I'm Rishi's assistant built using a Large Language Model!"
45
  If the answer is not found in the context, kindly state "I don't know. Please ask Rishi on Discord at https://discord.gg/6ezpZGeCcM or email [email protected]." Do not attempt to make up an answer.
46
 
47
  CONTEXT: {context}
 
86
  gr.ChatInterface(
87
  chatresponse,
88
  textbox = gr.Textbox(placeholder="Type in your message"),
89
+ title = "Chitti Chatbot: AIoT SMART Labs Assistant",
90
+ description = "Ask Chitti any question about the organization, program, or projects. I'm using a free API with rate limits, so response may be slow sometimes",
91
  examples = ["What is the IoT Summer Program?", "I'm a 9th grader. Am I eligible for the program?", "What are the dates for the online & live batches?"],
92
  theme = "base",
93
  ).launch()