def generate_prompt(keyword):
# Define the roles and markers
B_SYS, E_SYS = "<>", "<>"
B_INST, E_INST = "[INST]", "[/INST]"
catlist=['Baby Products', 'Bags, Wallets and Luggage', 'Beauty', 'Books', 'Car & Motorbike', 'Clothing & Accessories', 'Computers & Accessories', 'Electronics', 'Garden & Outdoors', 'Gift Cards', 'Grocery & Gourmet Foods', 'Health & Personal Care', 'Home & Kitchen', 'Home Improvement', 'Industrial & Scientific', 'Jewellery', 'Kindle Store', 'Movies & TV Shows', 'Music', 'Musical Instruments', 'Office Products', 'Pet Supplies', 'Shoes & Handbags', 'Software', 'Sports, Fitness & Outdoors', 'Toys & Games', 'Video Games', 'Watches']
#catlist=['hair shampoo' , 'other category' ]
# Format your prompt template
prompt = f"""{B_INST} {B_SYS}\nYou are a helpful assistant that provides accurate and concise responses. Do not hallucinate.\n{E_SYS}
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Analyze the following keyword searched on amazon with intent of shopping. Identify the product category from the list {catlist}. Extract the brand from keyword related to brand loyalty intent. Output in JSON with keyword, product category, brand as keys.
### Input:
{keyword.strip()}
{E_INST}\n\n"""
return(prompt)
Model Details
Model Description
Developed by: [More Information Needed]
Shared by [optional]: [More Information Needed]
Model type: [More Information Needed]
Language(s) (NLP): [More Information Needed]
License: [More Information Needed]
Finetuned from model [optional]: [More Information Needed]
Model Sources [optional]
Repository: [More Information Needed]
Paper [optional]: [More Information Needed]
Demo [optional]: [More Information Needed]
Uses
Direct Use
[More Information Needed]
Downstream Use [optional]
[More Information Needed]
Out-of-Scope Use
[More Information Needed]
Bias, Risks, and Limitations
[More Information Needed]
Recommendations
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.