Spaces:
Build error
Build error
Commit ·
674ea12
1
Parent(s): 81b851a
updated pom file
Browse files62 unmodified lines6364656667687 unmodified lines767778798081825 unmodified lines8889909192939462 unmodified lineswith NamedTemporaryFile(dir='.', suffix=f'.{pdfCSVURLText.lower()}') as f:f.write(uploaded_file.getbuffer())uploadedFilename = f.nameenableChatBox = Falseif genre==radioButtonList[0]: # E-commerce CSV7 unmodified lineselif genre==radioButtonList[4]: # Custom URLenableChatBox = TruechatTextStr = st.text_input(f'Ask me anything about this {pdfCSVURLText}', '', placeholder="Type your question here (e.g. what was the most sold item?)", disabled=not enableChatBox)chatWithPDFButton = "CLICK HERE TO START CHATTING"if st.button(chatWithPDFButton, disabled=not enableChatBox and not chatTextStr): # Button Cliked5 unmodified linesst.write(answer)elif genre==radioButtonList[1]: # Custom CSV Uploadpasselif genre==radioButtonList[2]: # Custom PDF Uploadpasselif genre==radioButtonList[3]: # Google Alphabet URL Earnings Report62 unmodified lines63646566676869707 unmodified lines787980818283845 unmodified lines9091929394959697989910062 unmodified lineswith NamedTemporaryFile(dir='.', suffix=f'.{pdfCSVURLText.lower()}') as f:f.write(uploaded_file.getbuffer())uploadedFilename = f.nameif genre==radioButtonList[1]: # Custom CSV UploaddataDF = pd.read_csv(uploadedFilename, encoding= 'unicode_escape')enableChatBox = Falseif genre==radioButtonList[0]: # E-commerce CSV7 unmodified lineselif genre==radioButtonList[4]: # Custom URLenableChatBox = TruechatTextStr = st.text_input(f'Ask me anything about this {pdfCSVURLText}', '', placeholder="Type here (e.g. Question1: What was the most sold item? Question2: What was the most common payment?)", disabled=not enableChatBox)chatWithPDFButton = "CLICK HERE TO START CHATTING"if st.button(chatWithPDFButton, disabled=not enableChatBox and not chatTextStr): # Button Cliked5 unmodified linesst.write(answer)elif genre==radioButtonList[1]: # Custom CSV Upload# Initializing the agentagent = create_pandas_dataframe_agent(llm, dataDF, verbose=False)answer = agent.run(chatTextStr)st.write(answer)elif genre==radioButtonList[2]: # Custom PDF Uploadpasselif genre==radioButtonList[3]: # Google Alphabet URL Earnings Report
app.py+8-2