markytools commited on
Commit
e9362af
·
1 Parent(s): a20ddb1

updated pom file

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -76,16 +76,20 @@ llm.temperature = 0.1
76
  pdfCSVURLText = ""
77
  if genre==radioButtonList[0]:
78
  pdfCSVURLText = "CSV"
 
79
  dataDF = pd.read_csv('EcommerceDataset.csv', encoding= 'unicode_escape')
80
  # st.write('You selected comedy.')
81
  # else:
82
  # st.write(f'''Password streamlit app: {st.secrets["PSWD"]}''')
83
  elif genre==radioButtonList[1]:
84
  pdfCSVURLText = "CSV"
 
85
  elif genre==radioButtonList[2]:
86
  pdfCSVURLText = "PDF"
 
87
  elif genre==radioButtonList[3]:
88
  pdfCSVURLText = "URL"
 
89
  urls = ['https://abc.xyz/investor/']
90
  loader = [UnstructuredURLLoader(urls=urls)]
91
  index = VectorstoreIndexCreator(
@@ -98,6 +102,7 @@ elif genre==radioButtonList[3]:
98
  input_key="question")
99
  elif genre==radioButtonList[4]:
100
  pdfCSVURLText = "URL"
 
101
 
102
  isCustomURL = genre==radioButtonList[4]
103
  urlInput = st.text_input('Enter your own URL', '', placeholder="Type your URL here (e.g. https://abc.xyz/investor/)", disabled=not isCustomURL)
@@ -153,7 +158,7 @@ elif genre==radioButtonList[3]: # Google Alphabet URL Earnings Report
153
  elif genre==radioButtonList[4]: # Custom URL
154
  enableChatBox = True
155
 
156
- chatTextStr = 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)
157
  chatWithPDFButton = "CLICK HERE TO START CHATTING"
158
  if st.button(chatWithPDFButton, disabled=not enableChatBox and not chatTextStr): # Button Cliked
159
 
 
76
  pdfCSVURLText = ""
77
  if genre==radioButtonList[0]:
78
  pdfCSVURLText = "CSV"
79
+ exampleQuestion = "Question1: What was the most sold item? Question2: What was the most common payment?"
80
  dataDF = pd.read_csv('EcommerceDataset.csv', encoding= 'unicode_escape')
81
  # st.write('You selected comedy.')
82
  # else:
83
  # st.write(f'''Password streamlit app: {st.secrets["PSWD"]}''')
84
  elif genre==radioButtonList[1]:
85
  pdfCSVURLText = "CSV"
86
+ exampleQuestion = "What are the data columns?"
87
  elif genre==radioButtonList[2]:
88
  pdfCSVURLText = "PDF"
89
+ exampleQuestion = "Can you summarize the contents?"
90
  elif genre==radioButtonList[3]:
91
  pdfCSVURLText = "URL"
92
+ exampleQuestion = "What is Google's latest earnings?"
93
  urls = ['https://abc.xyz/investor/']
94
  loader = [UnstructuredURLLoader(urls=urls)]
95
  index = VectorstoreIndexCreator(
 
102
  input_key="question")
103
  elif genre==radioButtonList[4]:
104
  pdfCSVURLText = "URL"
105
+ exampleQuestion = "Can you summarize the contents?"
106
 
107
  isCustomURL = genre==radioButtonList[4]
108
  urlInput = st.text_input('Enter your own URL', '', placeholder="Type your URL here (e.g. https://abc.xyz/investor/)", disabled=not isCustomURL)
 
158
  elif genre==radioButtonList[4]: # Custom URL
159
  enableChatBox = True
160
 
161
+ chatTextStr = st.text_input(f'Ask me anything about this {pdfCSVURLText}', '', placeholder=f"Type here (e.g. {exampleQuestion})", disabled=not enableChatBox)
162
  chatWithPDFButton = "CLICK HERE TO START CHATTING"
163
  if st.button(chatWithPDFButton, disabled=not enableChatBox and not chatTextStr): # Button Cliked
164