Spaces:
Sleeping
Sleeping
Update third.py
Browse files
third.py
CHANGED
|
@@ -56,6 +56,17 @@ async def main(editable_output2, keyword_id):
|
|
| 56 |
# Generate the purpose.
|
| 57 |
purpose = f"about {h1_text}, focusing particularly on {' and '.join(h2_texts)} and {' and '.join(h3_texts)}, to investigate the latest information and details"
|
| 58 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
# Convert the purpose into an instruction in the form of a question.
|
| 60 |
instruction = f"Can you research {purpose} and include specific details in your response?"
|
| 61 |
|
|
|
|
| 56 |
# Generate the purpose.
|
| 57 |
purpose = f"about {h1_text}, focusing particularly on {' and '.join(h2_texts)} and {' and '.join(h3_texts)}, to investigate the latest information and details"
|
| 58 |
|
| 59 |
+
# Specify the type of information you want to research.
|
| 60 |
+
if "人物" in h1_text or any("人物" in h2_text for h2_text in h2_texts) or any("人物" in h3_text for h3_text in h3_texts):
|
| 61 |
+
# If the topic is about a person, specify that you want to research their name and career.
|
| 62 |
+
purpose += " including the person's name and career"
|
| 63 |
+
elif "商品" in h1_text or any("商品" in h2_text for h2_text in h2_texts) or any("商品" in h3_text for h3_text in h3_texts):
|
| 64 |
+
# If the topic is about a product, specify that you want to research the brand name, product name, and price.
|
| 65 |
+
purpose += " including the brand name, product name, and price"
|
| 66 |
+
elif "イベント" in h1_text or any("イベント" in h2_text for h2_text in h2_texts) or any("イベント" in h3_text for h3_text in h3_texts):
|
| 67 |
+
# If the topic is about an event, specify that you want to research the event's content, schedule, and venue.
|
| 68 |
+
purpose += " including the event's content, schedule, and venue"
|
| 69 |
+
|
| 70 |
# Convert the purpose into an instruction in the form of a question.
|
| 71 |
instruction = f"Can you research {purpose} and include specific details in your response?"
|
| 72 |
|