Update app3.py
Browse files
app3.py
CHANGED
|
@@ -58,13 +58,13 @@ def generate_gemini_post(role, temp):
|
|
| 58 |
# Example implementation:
|
| 59 |
#gemini = Gemini(api_key=st.secrets["YOUR_GEMINI_API_KEY"], temperature=temp)
|
| 60 |
user_input = (
|
| 61 |
-
f"You as {role} Create a professional, engaging LinkedIn post about {topic}.
|
| 62 |
-
f"Adjust the tone and style based on a temperature of {temp}. "
|
| 63 |
-
"It should start with an attention grabbing hook based on audience pain. "
|
| 64 |
-
"Then a line to agitate the user. This should be in the next line. "
|
| 65 |
-
"The post should be concise, informative, and suitable for a professional audience. "
|
| 66 |
-
"It should provide value, insights, or thought-provoking content related to the topic. "
|
| 67 |
-
"And only contain 3 points. "
|
| 68 |
)
|
| 69 |
llm = ChatGoogleGenerativeAI(model="gemini-pro")
|
| 70 |
result = llm.invoke(user_input)
|
|
|
|
| 58 |
# Example implementation:
|
| 59 |
#gemini = Gemini(api_key=st.secrets["YOUR_GEMINI_API_KEY"], temperature=temp)
|
| 60 |
user_input = (
|
| 61 |
+
f"You as {role} Create a professional, engaging LinkedIn post about {topic}."+
|
| 62 |
+
f"Adjust the tone and style based on a temperature of {temp}. " +
|
| 63 |
+
"It should start with an attention grabbing hook based on audience pain. "+
|
| 64 |
+
"Then a line to agitate the user. This should be in the next line. "+
|
| 65 |
+
"The post should be concise, informative, and suitable for a professional audience. "+
|
| 66 |
+
"It should provide value, insights, or thought-provoking content related to the topic. "+
|
| 67 |
+
"And only contain 3 points. "+
|
| 68 |
)
|
| 69 |
llm = ChatGoogleGenerativeAI(model="gemini-pro")
|
| 70 |
result = llm.invoke(user_input)
|