Spaces:
Runtime error
Runtime error
Update app.py
Browse files71 unmodified lines72737475767778798081828384125 unmodified lines21021121220620720820921021121221321421571 unmodified lines components.html(documentHTML5, width=800, height=300) #return result
def generate_filename(prompt, file_type): central = pytz.timezone('US/Central') safe_date_time = datetime.now(central).strftime("%m%d_%H%M") replaced_prompt = prompt.replace(" ", "_").replace("\n", "_") safe_prompt = "".join(x for x in replaced_prompt if x.isalnum() or x == "_")[:90] return f"{safe_date_time}_{safe_prompt}.{file_type}"
# Chat and Chat with filesdef chat_with_model(prompt, document_section, model_choice='gpt-3.5-turbo'): model = model_choice125 unmodified lines return header, detail return None, None
def generate_filename(prompt, file_type): central = pytz.timezone('US/Central') safe_date_time = datetime.now(central).strftime("%m%d_%H%M") replaced_prompt = prompt.replace(" ", "_").replace("\n", "_") safe_prompt = "".join(x for x in replaced_prompt if x.isalnum() or x == "_")[:90] return f"{safe_date_time}_{safe_prompt}.{file_type}"
def transcribe_audio(file_path, model): key = os.getenv('OPENAI_API_KEY') headers = {app.py+7-7