ruggsea commited on
Commit
83bdaa2
·
1 Parent(s): 525383c

New requirements.txt

Browse files
Files changed (2) hide show
  1. app.py +5 -4
  2. requirements.txt +2 -1
app.py CHANGED
@@ -94,12 +94,13 @@ if search_query:
94
  # Format score to 3 decimal places
95
  score = f"{node.score:.3f}" if hasattr(node, 'score') else "N/A"
96
 
97
- # Create expandable container with new title format
98
  with st.expander(f"Result {i} (score: {score})\n\n{preview}", expanded=False):
99
  st.markdown(node.text)
100
- if node.metadata:
101
- st.markdown("---")
102
- st.markdown("**Source:**")
 
103
  st.json(node.metadata)
104
 
105
  # Add sidebar with information
 
94
  # Format score to 3 decimal places
95
  score = f"{node.score:.3f}" if hasattr(node, 'score') else "N/A"
96
 
97
+ # Main text expander
98
  with st.expander(f"Result {i} (score: {score})\n\n{preview}", expanded=False):
99
  st.markdown(node.text)
100
+
101
+ # Separate metadata expander
102
+ if node.metadata:
103
+ with st.expander(f"Result {i} - Metadata", expanded=False):
104
  st.json(node.metadata)
105
 
106
  # Add sidebar with information
requirements.txt CHANGED
@@ -1,4 +1,5 @@
1
  streamlit
2
  llama-index
3
  sentence-transformers
4
- llama-index-retrievers-bm25
 
 
1
  streamlit
2
  llama-index
3
  sentence-transformers
4
+ llama-index-retrievers-bm25
5
+ llama-index-embeddings-huggingface