mroccuper commited on
Commit
cfdddd5
·
verified ·
1 Parent(s): 3c355e5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -133,9 +133,9 @@ def generate_amazon_listing(api_key_input, quote, niche, target, keywords):
133
  model = genai.GenerativeModel(
134
  'gemini-1.5-pro', # Or 'gemini-1.5-flash' for potentially faster/cheaper generation
135
  generation_config={
136
- "temperature": 0.3, # Lower temperature for more predictable output
137
- "top_p": 0.8,
138
- "max_output_tokens": 1024, # Maximum tokens the API can *return*
139
  "response_mime_type": "application/json" # Request JSON directly
140
  }
141
  )
@@ -312,7 +312,7 @@ def create_interface():
312
 
313
  with gr.Column(scale=2):
314
  status = gr.Textbox(label="Status", value="Ready", interactive=False, lines=1)
315
- output = gr.Textbox(label="Generated Amazon Listing", lines=20, interactive=True) # Make output selectable
316
 
317
  # This function is called when the button is clicked
318
  def on_submit(api_key_from_ui, quote, niche, target, keywords):
 
133
  model = genai.GenerativeModel(
134
  'gemini-1.5-pro', # Or 'gemini-1.5-flash' for potentially faster/cheaper generation
135
  generation_config={
136
+ "temperature": 0.2, # Lower temperature for more predictable output
137
+ "top_p": 0.7,
138
+ "max_output_tokens": 512, # Maximum tokens the API can *return*
139
  "response_mime_type": "application/json" # Request JSON directly
140
  }
141
  )
 
312
 
313
  with gr.Column(scale=2):
314
  status = gr.Textbox(label="Status", value="Ready", interactive=False, lines=1)
315
+ output = gr.Textbox(label="Generated Amazon Listing", lines=22, interactive=True) # Make output selectable
316
 
317
  # This function is called when the button is clicked
318
  def on_submit(api_key_from_ui, quote, niche, target, keywords):