Spaces:
Build error
Build error
SHAMIL SHAHBAZ AWAN commited on
Update app.py
Browse files177 unmodified lines1781791801811821831841851861871887 unmodified lines196197198199200201202177 unmodified lines# Retrieve the most relevant chunks based on the valid indicesretrieved_chunks = [chunks[idx] for idx in valid_indices]# Display the retrieved chunksst.subheader("Retrieved Chunks")for chunk in retrieved_chunks:st.write(chunk)# Combine the retrieved chunks with the query and generate a response using Groqcombined_input = " ".join(retrieved_chunks) + user_query7 unmodified linesmodel="llama3-8b-8192", # Specify the model you want to use)# Display the generated responsest.subheader("Generated Response")st.write(chat_completion.choices[0].message.content)except Exception as e:177 unmodified lines1781791801811821837 unmodified lines191192193194195196197177 unmodified lines# Retrieve the most relevant chunks based on the valid indicesretrieved_chunks = [chunks[idx] for idx in valid_indices]# Combine the retrieved chunks with the query and generate a response using Groqcombined_input = " ".join(retrieved_chunks) + user_query7 unmodified linesmodel="llama3-8b-8192", # Specify the model you want to use)# Display only the generated responsest.subheader("Generated Response")st.write(chat_completion.choices[0].message.content)except Exception as e:
app.py+1-6