srisakthi2821 commited on
Commit
03a962e
1 Parent(s): bb60773

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -6
app.py CHANGED
@@ -4,16 +4,11 @@ from langchain.chat_models import ChatOpenAI
4
  from langchain import LLMChain, PromptTemplate
5
  from langchain.memory import ConversationBufferMemory
6
 
7
- def print_message():
8
- msg="Hi Im you chat Ai"
9
- msgg=print_message()
10
-
11
  OPENAI_API_KEY=os.getenv('OPENAI_API_KEY')
12
  template = """Your name is Sri,You are the assistant of a food website for clearing doubts about the customers.if the custome ask about your self definetely you say your name...dont tell simply ai.your developer name is MR.SRISAKTHI studying in university college of engineering nagercoil with the help of NTX wave plat form.Srisakthi is a FUll stack developer.And you developer's girlfriend name is Miss.SRIVIDHYA studying in K.S Rangasamy college of technology in Namaakal. Srividhya is such a beautiful girl and kind hearted person and she likes most the unexpected surprises and loveing and caring.
13
  {chat_history}
14
  User: {user_message}
15
- Chatbot:"""msg
16
-
17
  prompt = PromptTemplate(
18
  input_variables=["chat_history", "user_message"], template=template
19
  )
@@ -32,6 +27,10 @@ def get_text_response(user_message,history):
32
  return response
33
 
34
  demo = gr.ChatInterface(get_text_response, examples=["Whats about your self ?","Who Developed Sri-Ai","what about your developer"])
 
 
35
 
36
  if __name__ == "__main__":
37
  demo.launch() #To create a public link, set `share=True` in `launch()`. To enable errors and logs, set `debug=True` in `launch()`.
 
 
 
4
  from langchain import LLMChain, PromptTemplate
5
  from langchain.memory import ConversationBufferMemory
6
 
 
 
 
 
7
  OPENAI_API_KEY=os.getenv('OPENAI_API_KEY')
8
  template = """Your name is Sri,You are the assistant of a food website for clearing doubts about the customers.if the custome ask about your self definetely you say your name...dont tell simply ai.your developer name is MR.SRISAKTHI studying in university college of engineering nagercoil with the help of NTX wave plat form.Srisakthi is a FUll stack developer.And you developer's girlfriend name is Miss.SRIVIDHYA studying in K.S Rangasamy college of technology in Namaakal. Srividhya is such a beautiful girl and kind hearted person and she likes most the unexpected surprises and loveing and caring.
9
  {chat_history}
10
  User: {user_message}
11
+ Chatbot:"""
 
12
  prompt = PromptTemplate(
13
  input_variables=["chat_history", "user_message"], template=template
14
  )
 
27
  return response
28
 
29
  demo = gr.ChatInterface(get_text_response, examples=["Whats about your self ?","Who Developed Sri-Ai","what about your developer"])
30
+ def print_message():
31
+ msg="Hi Im you chat Ai"
32
 
33
  if __name__ == "__main__":
34
  demo.launch() #To create a public link, set `share=True` in `launch()`. To enable errors and logs, set `debug=True` in `launch()`.
35
+ msgg=print_message()
36
+ print(msgg)