Spaces:
Sleeping
Sleeping
Update app.py
Browse files145 unmodified lines14614714814915015115212 unmodified lines165166167168169170171145 unmodified linescoupon = get_coupon(query, grag_response)return couponwith gr.Blocks() as demo:gr.Markdown("# Comfy Virtual Assistant")12 unmodified linesdef respond(message, chat_history):bot_message = query_tqa(message, 2)chat_history.append((message, bot_message))time.sleep(1)return "", chat_history145 unmodified lines14614714814915015115215315415515615712 unmodified lines170171172173174175176177178145 unmodified linescoupon = get_coupon(query, grag_response)return coupon# from gradio import ChatMessage# def chat_function(message, history):# history.append(ChatMessage(role="user", content=message))# history.append(ChatMessage(role="assistant", content="Hello, how can I help you?"))# return historywith gr.Blocks() as demo:gr.Markdown("# Comfy Virtual Assistant")12 unmodified linesdef respond(message, chat_history):bot_message = query_tqa(message, 2)# chat_history.append((message, bot_message))chat_history.append(ChatMessage(role="user", content=message))chat_history.append(ChatMessage(role="assistant", content=bot_message))time.sleep(1)return "", chat_history
app.py+8-1