Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dapeng bao patch 1 #403

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 40 additions & 1 deletion visual_chatgpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -1458,6 +1458,45 @@ def get_mask(self, image_path):

return mask

class SearchAssist:
def __init__(self, device):
print(f"Initializing SearchAssist to {device}")
self.device = device
# def __init__(self,inputs):
# self.inputs=inputs
@prompts(name="Search Order",
description="useful for when you need to answer questions about customers orders")
def inference(self,inputs):
return "订单状态;已发货;发货日期;2023-01-01;预计送达时间:2023-01-10"



class RecommandProduct:
def __init__(self, device):
print(f"Initializing RecommandProduct to {device}")
self.device = device

# def __init__(self,inputs):
# self.inputs=inputs

@prompts(name="Recommend Product",
description="useful for when you need to answer questions about product recommendations")
def inference(self, inputs):
return "收钱吧扫码王"

class FQA:
def __init__(self, device):
print(f"Initializing SearchAssist to {device}")
self.device = device
# def __init__(self,inputs):
# self.inputs=inputs
@prompts(name="FAQ",
description="useful for when you need to answer questions about shopping policies, like return policy, shipping policy, etc.s")
def inference(self, inputs):
return "七天无理由退换货"




class ConversationBot:
def __init__(self, load_dict):
Expand Down Expand Up @@ -1577,4 +1616,4 @@ def run_image(self, image, state, txt, lang):
clear.click(bot.memory.clear)
clear.click(lambda: [], None, chatbot)
clear.click(lambda: [], None, state)
demo.launch(server_name="0.0.0.0", server_port=7861)
demo.launch(server_name="0.0.0.0", server_port=7861)