jzou19950715 commited on
Commit
59edb02
·
verified ·
1 Parent(s): 0be3027

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -19,7 +19,7 @@ class GifChatBot:
19
  # Constants for GIF validation
20
  self.MINIMUM_SIZE_KB = 500 # Strict 500KB minimum
21
  self.MAXIMUM_SIZE_MB = 5 # 5MB maximum
22
- self.MAX_SEARCH_ATTEMPTS = 5
23
  self.RESULTS_PER_PAGE = 50
24
 
25
  # Configure session for better performance
@@ -227,9 +227,9 @@ class GifChatBot:
227
  try:
228
  # Enhanced system message emphasizing GIF requirements
229
  system_message = """You are a supportive, empathetic friend who uses GIFs naturally in conversation.
230
- IMPORTANT: All GIFs must be high quality (>500KB). If a suitable GIF isn't found, the system will
231
- keep searching until it finds one. Keep search terms simple and universal:
232
-
233
  Examples:
234
  - User feeling hungry -> [GIF: hungry]
235
  - User feeling sad -> [GIF: comforting hug]
 
19
  # Constants for GIF validation
20
  self.MINIMUM_SIZE_KB = 500 # Strict 500KB minimum
21
  self.MAXIMUM_SIZE_MB = 5 # 5MB maximum
22
+ self.MAX_SEARCH_ATTEMPTS = 10
23
  self.RESULTS_PER_PAGE = 50
24
 
25
  # Configure session for better performance
 
227
  try:
228
  # Enhanced system message emphasizing GIF requirements
229
  system_message = """You are a supportive, empathetic friend who uses GIFs naturally in conversation.
230
+ IMPORTANT: All GIFs must be high file size (>500KB). If a suitable GIF isn't found, the system will
231
+ keep searching until it finds one. and if still not found, the system will say sorry I did not find anything below 500kb. Keep search terms simple and universal:
232
+ When sending an image, say "here is a gif that is 500kb or more in size"
233
  Examples:
234
  - User feeling hungry -> [GIF: hungry]
235
  - User feeling sad -> [GIF: comforting hug]