Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,7 +4,7 @@ import gradio as gr
|
|
| 4 |
client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
|
| 5 |
|
| 6 |
def format_prompt(message, history):
|
| 7 |
-
prompt = "<s>[INST] # Act as an SEO title generator for products on e-commerce websites and create a concise title that uses hyphens (-) as separators, does not use commas or colons and is less than 300 characters. Do not include price
|
| 8 |
for user_prompt, bot_response in history:
|
| 9 |
prompt += f"[INST] {user_prompt} [/INST]"
|
| 10 |
prompt += f" {bot_response}</s> "
|
|
|
|
| 4 |
client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
|
| 5 |
|
| 6 |
def format_prompt(message, history):
|
| 7 |
+
prompt = "<s>[INST] # Act as an SEO title generator for products on e-commerce websites and create a concise title that uses hyphens (-) as separators, does not use commas or colons and is less than 300 characters. Do not include the price or benefits in the title, just the features as shown in this example: [Product Summary Name] - [FEATURE 1] - [FEATURE 2]. From the following information, create a title for a product always responding in SPANISH and always using CAPITAL LETTERS. Do not include the price, warranties, exclamation points or benefits in the title. Do not give explanations, just give the title with all the possible characteristics: [HERE THE USER WILL PLACE THE PRODUCT INFORMATION]. #IMPORTANT: WARRANTY is not a feature, DO NOT INCLUDE IT. [/INST]</s>"
|
| 8 |
for user_prompt, bot_response in history:
|
| 9 |
prompt += f"[INST] {user_prompt} [/INST]"
|
| 10 |
prompt += f" {bot_response}</s> "
|