louiecerv commited on
Commit
2ef385a
·
verified ·
1 Parent(s): f9479bf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -37,8 +37,8 @@ with st.sidebar:
37
  )
38
 
39
  # Sliders for Text Length and Creativity
40
- text_length = st.slider("Text Length (words):", min_value=50, max_value=1000, step=50)
41
- creativity_level = st.slider("Creativity Level:", min_value=0.0, max_value=1.0, step=0.1)
42
 
43
  # Checkboxes for Features
44
  creative_mode = st.checkbox("Enable Creative Mode")
@@ -69,7 +69,7 @@ if st.button("Generate"):
69
  response = model.generate_content(
70
  f"Format: {output_format}\nTone: {tone_style}\nPrompt: {user_prompt}",
71
  generation_config = genai.GenerationConfig(
72
- max_output_tokens=1000,
73
  temperature=creativity_level,
74
  )
75
  )
 
37
  )
38
 
39
  # Sliders for Text Length and Creativity
40
+ text_length = st.slider("Text Length (words):", min_value=50, max_value=2000, value=1000, step=50)
41
+ creativity_level = st.slider("Creativity Level:", min_value=0.0, max_value=1.0, value=0.3, step=0.1)
42
 
43
  # Checkboxes for Features
44
  creative_mode = st.checkbox("Enable Creative Mode")
 
69
  response = model.generate_content(
70
  f"Format: {output_format}\nTone: {tone_style}\nPrompt: {user_prompt}",
71
  generation_config = genai.GenerationConfig(
72
+ max_output_tokens=text_length * 2,
73
  temperature=creativity_level,
74
  )
75
  )