EngrNarmeen commited on
Commit
0f7414c
·
verified ·
1 Parent(s): a792811

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -79,3 +79,9 @@ if uploaded_file:
79
  # Find the most relevant chunk
80
  query_embedding = model.encode([query])
81
  _, indices = index.search(query_embedding, 1)
 
 
 
 
 
 
 
79
  # Find the most relevant chunk
80
  query_embedding = model.encode([query])
81
  _, indices = index.search(query_embedding, 1)
82
+ relevant_chunk = chunks[indices[0][0]]
83
+
84
+ # Query Groq
85
+ response = query_groq(relevant_chunk)
86
+ st.write("Response from Groq:")
87
+ st.write(response)