JBHF commited on
Commit
c982048
·
verified ·
1 Parent(s): ab31d59

Update app.py

Browse files

app.py
19-03-2024, 09:00 CET

Files changed (1) hide show
  1. app.py +33 -8
app.py CHANGED
@@ -1,3 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  # JB:
2
  # LangChainDeprecationWarning: Importing embeddings from langchain is deprecated.
3
  # Importing from langchain will no longer be supported as of langchain==0.2.0.
@@ -46,27 +69,29 @@ groq_api_key = "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" # os.e
46
  print("groq_api_key: ", groq_api_key)
47
 
48
  # st.title("Chat with Docs - Groq Edition :) ")
49
- st.write("NonToxicGlazeAdvisor: A tool for getting advice on non-toxic ceramic glazes for earthenware temperature ranges.")
50
- st.write("Victor Benchuijsen : (Glaze techniques / Ceramics)")
51
- st.write("Jan Bours : Artificial Intelligence / Data Science / Natural Language Processing (ALL RIGHTS RESERVED)")
 
 
52
  st.write("---------------------------------")
53
- st.write("Chat with Docs - Using AI: 'mixtral-8x7b-32768' Groq Edition (Very Fast!) - VERSION 1 - March 18, 2024")
54
  st.write("---------------------------------")
55
 
56
- st.write("LIST OF ALL THE LOADED DOCUMENTS: ")
57
  st.write("")
58
  pdf_files = glob.glob("*.pdf")
59
  # word_files = glob.glob("*.docx")
60
  for file in pdf_files:
61
  # for file in word_files:
62
- st.write(file)
63
 
64
  st.write("---------------------------------")
65
 
66
  if "vector" not in st.session_state:
67
 
68
- st.write("Chunking, embedding, storing in FAISS vectorstore (Can take a long time!).")
69
- st.write("Wait till this hase been done before you can enter your query! .......")
70
 
71
  # st.session_state.embeddings = OllamaEmbeddings() # ORIGINAL
72
  st.session_state.embeddings = FastEmbedEmbeddings() # JB
 
1
+ # app.py - 19-03-2024
2
+
3
+ # STREAMLIT:
4
+ # https://www.datacamp.com/tutorial/streamlit:
5
+ #
6
+ # st.title(): This function allows you to add the title of the app.
7
+ # st.header(): This function is used to set header of a section.
8
+ # st.markdown(): This function is used to set a markdown of a section.
9
+ # st.subheader(): This function is used to set sub-header of a section.
10
+ # st.caption(): This function is used to write caption.
11
+ # st.code(): This function is used to set a code.
12
+ # st.latex(): This function is used to display mathematical expressions formatted as LaTeX.
13
+ #
14
+ # st.title ("this is the app title")
15
+ # st.header("this is the header ")
16
+ # st.markdown("this is the markdown")
17
+ # st.subheader("this is the subheader")
18
+ # st.caption("this is the caption")
19
+ # st.code("x=2021")
20
+ # st.latex(r''' a+a r^1+a r^2+a r^3 ''')
21
+
22
+
23
+
24
  # JB:
25
  # LangChainDeprecationWarning: Importing embeddings from langchain is deprecated.
26
  # Importing from langchain will no longer be supported as of langchain==0.2.0.
 
69
  print("groq_api_key: ", groq_api_key)
70
 
71
  # st.title("Chat with Docs - Groq Edition :) ")
72
+ # # st.title ("this is the app title")
73
+ st.title("Non-Toxic Glaze Advisor:")
74
+ st.title("A tool for getting advice on non-toxic ceramic glazes for earthenware temperature ranges.")
75
+ st.title("Victor Benchuijsen : (Glaze techniques / Ceramics)")
76
+ st.title("Jan Bours : Artificial Intelligence / Data Science / Natural Language Processing (ALL RIGHTS RESERVED)")
77
  st.write("---------------------------------")
78
+ st.header("Chat with Docs - Using AI: 'mixtral-8x7b-32768' Groq Edition (Very Fast!) - VERSION 1 - March 18, 2024")
79
  st.write("---------------------------------")
80
 
81
+ st.header("LIST OF ALL THE LOADED DOCUMENTS: ")
82
  st.write("")
83
  pdf_files = glob.glob("*.pdf")
84
  # word_files = glob.glob("*.docx")
85
  for file in pdf_files:
86
  # for file in word_files:
87
+ st.subheader(file)
88
 
89
  st.write("---------------------------------")
90
 
91
  if "vector" not in st.session_state:
92
 
93
+ st.header("Chunking, embedding, storing in FAISS vectorstore (Can take a long time!).")
94
+ st.subheader("Wait till this hase been done before you can enter your query! .......")
95
 
96
  # st.session_state.embeddings = OllamaEmbeddings() # ORIGINAL
97
  st.session_state.embeddings = FastEmbedEmbeddings() # JB