Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -32,7 +32,7 @@ from templates import css, bot_template, user_template
|
|
32 |
def generate_filename(prompt, file_type):
|
33 |
central = pytz.timezone('US/Central')
|
34 |
safe_date_time = datetime.now(central).strftime("%m%d_%I%M") # Date and time DD-TT
|
35 |
-
safe_prompt = "".join(x for x in prompt if x.isalnum())[:
|
36 |
return f"{safe_date_time}_{safe_prompt}.{file_type}" # Return a safe file name
|
37 |
|
38 |
def transcribe_audio(openai_key, file_path, model):
|
|
|
32 |
def generate_filename(prompt, file_type):
|
33 |
central = pytz.timezone('US/Central')
|
34 |
safe_date_time = datetime.now(central).strftime("%m%d_%I%M") # Date and time DD-TT
|
35 |
+
safe_prompt = "".join(x for x in prompt if x.isalnum())[:90] # Limit file name size and trim whitespace
|
36 |
return f"{safe_date_time}_{safe_prompt}.{file_type}" # Return a safe file name
|
37 |
|
38 |
def transcribe_audio(openai_key, file_path, model):
|