Spaces:
Runtime error
Runtime error
Update app.py
Browse files71 unmodified lines727374757677125 unmodified lines20320420520620720820921021121221321421571 unmodified linescomponents.html(documentHTML5, width=800, height=300)#return result# Chat and Chat with filesdef chat_with_model(prompt, document_section, model_choice='gpt-3.5-turbo'):model = model_choice125 unmodified linesreturn header, detailreturn None, Nonedef 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 = {71 unmodified lines72737475767778798081828384125 unmodified lines21021121221321421571 unmodified linescomponents.html(documentHTML5, width=800, height=300)#return resultdef 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 linesreturn header, detailreturn None, Nonedef transcribe_audio(file_path, model):key = os.getenv('OPENAI_API_KEY')headers = {
app.py+7-7