Spaces:
Paused
Paused
Update app.py
Browse files34 unmodified lines35363738394041424344454647484934 unmodified linesprint("Unable to locate valid description.")# Find the last occurrence of "."#last_period_index = full_sentence.rfind('.')# Truncate the string up to the last period#truncated_caption = full_sentence[:last_period_index + 1]# print(truncated_caption)#print(f"\n—\nIMAGE CAPTION: {truncated_caption}")return descriptiondef get_magnet(prompt):amended_prompt = f"High quality sound effects. {prompt}"34 unmodified lines35363738394041424344454647484934 unmodified linesprint("Unable to locate valid description.")# Find the last occurrence of "."last_period_index = description.rfind('.')# Truncate the string up to the last periodtruncated_caption = description[:last_period_index + 1]# print(truncated_caption)print(f"\n—\nIMAGE CAPTION: {truncated_caption}")return truncated_captiondef get_magnet(prompt):amended_prompt = f"High quality sound effects. {prompt}"
app.py+4-4