jaindivyansh commited on
Commit
22f2c80
·
verified ·
1 Parent(s): d2b9f46
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -8,6 +8,7 @@ from rag import load_all, run_query
8
  @st.cache_resource(
9
  show_spinner="Loading models and indices. This might take a while..."
10
  )
 
11
  def get_rag_qa() -> dict:
12
  gc.collect()
13
  torch.cuda.empty_cache()
@@ -19,6 +20,7 @@ def get_rag_qa() -> dict:
19
  )
20
 
21
 
 
22
  left_column, cent_column, last_column = st.columns(3)
23
  with cent_column:
24
  st.image("cover.webp", width=400)
@@ -32,7 +34,9 @@ st.subheader("Ask away:")
32
  question = st.text_input("Ask away:", "", label_visibility="collapsed")
33
  submit = st.button("Submit")
34
 
 
35
  st.markdown(
 
36
  """
37
  > **For example, ask things like:**
38
  >
@@ -44,6 +48,7 @@ st.markdown(
44
  unsafe_allow_html=False,
45
  )
46
 
 
47
  if submit:
48
  if not question.strip():
49
  st.error("Machine Learning still can't read minds. Please enter a question.")
 
8
  @st.cache_resource(
9
  show_spinner="Loading models and indices. This might take a while..."
10
  )
11
+
12
  def get_rag_qa() -> dict:
13
  gc.collect()
14
  torch.cuda.empty_cache()
 
20
  )
21
 
22
 
23
+
24
  left_column, cent_column, last_column = st.columns(3)
25
  with cent_column:
26
  st.image("cover.webp", width=400)
 
34
  question = st.text_input("Ask away:", "", label_visibility="collapsed")
35
  submit = st.button("Submit")
36
 
37
+
38
  st.markdown(
39
+
40
  """
41
  > **For example, ask things like:**
42
  >
 
48
  unsafe_allow_html=False,
49
  )
50
 
51
+
52
  if submit:
53
  if not question.strip():
54
  st.error("Machine Learning still can't read minds. Please enter a question.")