Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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)
|