JeCabrera commited on
Commit
357e361
·
verified ·
1 Parent(s): 8b96c5c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
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-2.0-flash')
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
- response = model.generate_content(prompt, temperature=temperature)
 
 
 
 
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