markytools commited on
Commit
6cbfbad
·
1 Parent(s): 413cb20
Files changed (2) hide show
  1. GOOPaper.pdf +0 -0
  2. app.py +3 -3
GOOPaper.pdf ADDED
The diff for this file is too large to render. See raw diff
 
app.py CHANGED
@@ -30,9 +30,9 @@ title = st.text_input('Enter your own URL', 'https://shorturl.at/csCK3', disable
30
  st.write('The current movie title is', title)
31
 
32
  isCustomPDF = genre==radioButtonList[1] or genre==radioButtonList[2]
33
- uploaded_file = st.file_uploader("Upload your own {pdfCSVURLText} here", type=pdfCSVURLText.lower(), disabled=not isCustomPDF)
34
  if uploaded_file is not None:
35
- with NamedTemporaryFile(dir='.', suffix='.csv') as f:
36
  f.write(uploaded_file.getbuffer())
37
  st.write('The current uploaded file is', f.name)
38
 
@@ -58,7 +58,7 @@ if genre==radioButtonList[0]:
58
  elif genre==radioButtonList[1]:
59
  enableChatBox = True
60
 
61
- title = st.text_input(f'Ask me anything about this {pdfCSVURLText}', 'Type here', disabled=not isCustomURL)
62
  chatWithPDFButton = "CLICK HERE TO START CHATTING"
63
  if st.button(chatWithPDFButton, type="primary"):
64
  pass
 
30
  st.write('The current movie title is', title)
31
 
32
  isCustomPDF = genre==radioButtonList[1] or genre==radioButtonList[2]
33
+ uploaded_file = st.file_uploader(f"Upload your own {pdfCSVURLText} here", type=pdfCSVURLText.lower(), disabled=not isCustomPDF)
34
  if uploaded_file is not None:
35
+ with NamedTemporaryFile(dir='.', suffix=f'.{pdfCSVURLText.lower()}') as f:
36
  f.write(uploaded_file.getbuffer())
37
  st.write('The current uploaded file is', f.name)
38
 
 
58
  elif genre==radioButtonList[1]:
59
  enableChatBox = True
60
 
61
+ title = 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 isCustomURL)
62
  chatWithPDFButton = "CLICK HERE TO START CHATTING"
63
  if st.button(chatWithPDFButton, type="primary"):
64
  pass