Spaces:
Paused
Paused
Add gemini-2.0-flash-thinking
Browse files
app.py
CHANGED
|
@@ -702,7 +702,7 @@ def generate(*data):
|
|
| 702 |
]
|
| 703 |
|
| 704 |
batch.append(messages)
|
| 705 |
-
|
| 706 |
ri = chat.generate_content(messages)
|
| 707 |
print("Gemini response: ", ri)
|
| 708 |
response.append(ri)
|
|
@@ -723,8 +723,6 @@ def generate(*data):
|
|
| 723 |
messages = [
|
| 724 |
SystemMessage(content=f"""You are a helpful assistant that writes about products for ecommerce websites. Make sure to write in {languages[i]} language."""),
|
| 725 |
HumanMessage(content=copy_prompt.format(nversions=nversions, min_length=min_length, max_length=max_length, key_features=key_features, structure=structure, copy=copy, included_phrases=included_phrases, excluded_phrases=excluded_phrases)),]
|
| 726 |
-
print(messages[1].content)
|
| 727 |
-
print('------------')
|
| 728 |
|
| 729 |
elif len(structure.strip()) > 0:
|
| 730 |
print('------------')
|
|
@@ -734,8 +732,8 @@ def generate(*data):
|
|
| 734 |
messages = [
|
| 735 |
SystemMessage(content=f"""You are a helpful assistant that writes about products for ecommerce websites. Make sure to write in {languages[i]} language."""),
|
| 736 |
HumanMessage(content=struct_prompt.format(nversions=nversions, min_length=min_length, max_length=max_length, key_features=key_features, structure=structure, copy=copy, included_phrases=included_phrases, excluded_phrases=excluded_phrases)),]
|
| 737 |
-
|
| 738 |
-
|
| 739 |
batch.append(messages)
|
| 740 |
|
| 741 |
response = chat.batch(batch)
|
|
|
|
| 702 |
]
|
| 703 |
|
| 704 |
batch.append(messages)
|
| 705 |
+
print("Gemini input: ", messages)
|
| 706 |
ri = chat.generate_content(messages)
|
| 707 |
print("Gemini response: ", ri)
|
| 708 |
response.append(ri)
|
|
|
|
| 723 |
messages = [
|
| 724 |
SystemMessage(content=f"""You are a helpful assistant that writes about products for ecommerce websites. Make sure to write in {languages[i]} language."""),
|
| 725 |
HumanMessage(content=copy_prompt.format(nversions=nversions, min_length=min_length, max_length=max_length, key_features=key_features, structure=structure, copy=copy, included_phrases=included_phrases, excluded_phrases=excluded_phrases)),]
|
|
|
|
|
|
|
| 726 |
|
| 727 |
elif len(structure.strip()) > 0:
|
| 728 |
print('------------')
|
|
|
|
| 732 |
messages = [
|
| 733 |
SystemMessage(content=f"""You are a helpful assistant that writes about products for ecommerce websites. Make sure to write in {languages[i]} language."""),
|
| 734 |
HumanMessage(content=struct_prompt.format(nversions=nversions, min_length=min_length, max_length=max_length, key_features=key_features, structure=structure, copy=copy, included_phrases=included_phrases, excluded_phrases=excluded_phrases)),]
|
| 735 |
+
print("Chat message", messages[1].content)
|
| 736 |
+
print('------------')
|
| 737 |
batch.append(messages)
|
| 738 |
|
| 739 |
response = chat.batch(batch)
|