Dax451 commited on
Commit
66779ad
·
verified ·
1 Parent(s): b720c90

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -183,9 +183,9 @@ class GeminiPromptGenerator:
183
  DO NOT include words like 'prompt' or 'description' in the response."""
184
 
185
  try:
186
- response = self.model.generate_content(system_prompt)
187
- if response.text:
188
- return response.text.strip()
189
  else:
190
  return "Sorry, I couldn't generate a creative prompt. Please try again."
191
  except Exception as e:
 
183
  DO NOT include words like 'prompt' or 'description' in the response."""
184
 
185
  try:
186
+ response = self.generate_content(system_prompt)
187
+ if response:
188
+ return response.strip()
189
  else:
190
  return "Sorry, I couldn't generate a creative prompt. Please try again."
191
  except Exception as e: