Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -186,7 +186,7 @@ def generate_filename(prompt, file_type):
|
|
186 |
central = pytz.timezone('US/Central')
|
187 |
safe_date_time = datetime.now(central).strftime("%m%d_%H%M")
|
188 |
replaced_prompt = re.sub(r'[<>:"/\\|?*\n]', ' ', prompt)
|
189 |
-
safe_prompt = re.sub(r'\s+', ' ', replaced_prompt).strip()[:
|
190 |
return f"{safe_date_time}_{safe_prompt}.{file_type}"
|
191 |
|
192 |
|
|
|
186 |
central = pytz.timezone('US/Central')
|
187 |
safe_date_time = datetime.now(central).strftime("%m%d_%H%M")
|
188 |
replaced_prompt = re.sub(r'[<>:"/\\|?*\n]', ' ', prompt)
|
189 |
+
safe_prompt = re.sub(r'\s+', ' ', replaced_prompt).strip()[:230]
|
190 |
return f"{safe_date_time}_{safe_prompt}.{file_type}"
|
191 |
|
192 |
|