Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ load_dotenv()
|
|
9 |
|
10 |
# Configure Google Gemini API
|
11 |
genai.configure(api_key=os.getenv('GOOGLE_API_KEY'))
|
12 |
-
model = genai.GenerativeModel('gemini-
|
13 |
|
14 |
# Hide Streamlit menu and footer
|
15 |
st.markdown("""
|
@@ -59,7 +59,11 @@ with col1:
|
|
59 |
and appeals to the target audience. Include a clear call to action."""
|
60 |
|
61 |
try:
|
62 |
-
|
|
|
|
|
|
|
|
|
63 |
st.success('✨ Your offer is ready!')
|
64 |
|
65 |
# Display result in the right column
|
|
|
9 |
|
10 |
# Configure Google Gemini API
|
11 |
genai.configure(api_key=os.getenv('GOOGLE_API_KEY'))
|
12 |
+
model = genai.GenerativeModel('gemini-pro')
|
13 |
|
14 |
# Hide Streamlit menu and footer
|
15 |
st.markdown("""
|
|
|
59 |
and appeals to the target audience. Include a clear call to action."""
|
60 |
|
61 |
try:
|
62 |
+
# Create generation config with temperature
|
63 |
+
generation_config = genai.GenerationConfig(temperature=temperature)
|
64 |
+
|
65 |
+
# Pass the generation config to generate_content
|
66 |
+
response = model.generate_content(prompt, generation_config=generation_config)
|
67 |
st.success('✨ Your offer is ready!')
|
68 |
|
69 |
# Display result in the right column
|