try
Browse files3 unmodified lines456789101112131415161718192021222324252678978 unmodified lines8889909192939495969798991001011021031041051061071081091101111121133 unmodified linesfrom sentence_transformers import SentenceTransformerimport torch
with gr.Blocks(theme='hmb/amethyst') as demo: with gr.Row(equal_height=True): with gr.Column(scale=10): gr.Markdown( """ # 🎁 Introducing WrapIT! **WrapIT** helps users find personalized gift ideas and craft thoughtful card messages by inputting details like the recipient's interests, celebration type, and budget. ✨ *All you have to do is wrap it.* """ )
chatbot = gr.Chatbot() msg = gr.Textbox(placeholder="Say hi to WrapIT here!") send = gr.Button("Send")
msg.submit(respond, [msg, chatbot], [msg, chatbot]) send.click(respond, [msg, chatbot], [msg, chatbot])
with open("knowledge.txt", "r", encoding="utf-8") as file: recent = file.read()78 unmodified lines #yield response["choices"][0]["message"]["content"].strip()
with gr.Blocks(theme='hmb/amethyst') as demo: with gr.Row(equal_height=True): with gr.Column(scale=10): gr.Markdown( """ # 🎁 Introducing WrapIT! **WrapIT** helps users find personalized gift ideas and craft thoughtful card messages by inputting details like the recipient's interests, celebration type, and budget. ✨ *All you have to do is wrap it.* """ )
chatbot = gr.Chatbot() msg = gr.Textbox(placeholder="Say hi to WrapIT here!") send = gr.Button("Send")
msg.submit(respond, [msg, chatbot], [msg, chatbot]) send.click(respond, [msg, chatbot], [msg, chatbot])
chatbot = gr.ChatInterface(respond, type='messages', theme='hmb/amethyst')chatbot.launch(debug=True)demo.launch()app.py+20-20