Update app.py
Browse files
app.py
CHANGED
@@ -78,28 +78,21 @@ prompt = PromptTemplate(
|
|
78 |
)
|
79 |
|
80 |
memory = ConversationBufferMemory(memory_key="chat_history")
|
81 |
-
|
82 |
llm_chain = LLMChain(
|
83 |
llm=ChatOpenAI(temperature='0.5', model_name="gpt-3.5-turbo"),
|
84 |
prompt=prompt,
|
85 |
verbose=True,
|
86 |
memory=memory,
|
87 |
)
|
88 |
-
|
89 |
def get_text_response(user_message,history):
|
90 |
response = llm_chain.predict(user_message = user_message)
|
91 |
return response
|
92 |
-
|
93 |
-
theme =
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
)
|
99 |
-
|
100 |
-
demo = gr.ChatInterface(get_text_response,clear_btn=False,retry_btn=False,stop_btn=False,undo_btn=False,theme=theme,
|
101 |
-
chatbot= gr.Chatbot(bubble_full_width=False,label='Kum bot',show_label=True,height=350,show_share_button=False,
|
102 |
-
avatar_images=('https://res.cloudinary.com/dtbarluca/image/upload/v1692694826/user_1177568_mmmdi6.png','https://res.cloudinary.com/dtbarluca/image/upload/v1690875247/hlogo.ico_nqdhd6.png')),examples=["Where did you learn this techonologies?","What are your interests?","Which places do you like to visit?","Your greatest Achievements?","how can connect to you through linkedin?"])
|
103 |
|
104 |
if __name__ == "__main__":
|
105 |
-
demo.launch()
|
|
|
78 |
)
|
79 |
|
80 |
memory = ConversationBufferMemory(memory_key="chat_history")
|
|
|
81 |
llm_chain = LLMChain(
|
82 |
llm=ChatOpenAI(temperature='0.5', model_name="gpt-3.5-turbo"),
|
83 |
prompt=prompt,
|
84 |
verbose=True,
|
85 |
memory=memory,
|
86 |
)
|
|
|
87 |
def get_text_response(user_message,history):
|
88 |
response = llm_chain.predict(user_message = user_message)
|
89 |
return response
|
90 |
+
|
91 |
+
theme =gr.themes.Default(primary_hue='purple')
|
92 |
+
demo = gr.ChatInterface(get_text_response, clear_btn=False,retry_btn=False,stop_btn=False,undo_btn=False,theme=theme,
|
93 |
+
chatbot= gr.Chatbot(bubble_full_width=False,label='vedam bot',show_label=True,height=350,show_share_button=False,
|
94 |
+
avatar_images=('https://res.cloudinary.com/dtbarluca/image/upload/v1692694826/user_1177568_mmmdi6.png','https://res.cloudinary.com/dtbarluca/image/upload/v1695729836/ck2v3fwlcr5u63vgri7b.png')),
|
95 |
+
examples=['what are the featuers of vedamedi?','How can i reach you?'])
|
|
|
|
|
|
|
|
|
|
|
96 |
|
97 |
if __name__ == "__main__":
|
98 |
+
demo.launch()
|