Prageeth-1 commited on
Commit
4defb50
·
verified ·
1 Parent(s): a9d8b03

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -149,6 +149,9 @@ with tab1:
149
  mime='text/csv'
150
  )
151
 
 
 
 
152
 
153
  with tab2:
154
  st.header("Question Answering Pipeline")
@@ -156,10 +159,9 @@ with tab2:
156
 
157
 
158
 
159
- if qa_file is not None:
160
- qa_df = pd.read_csv(qa_file)
161
-
162
- context = ' '.join(qa_df['predicted_category'].tolist())
163
  st.write(f"Loaded {len(qa_df)} news excerpts")
164
 
165
  else:
 
149
  mime='text/csv'
150
  )
151
 
152
+ # Store classification results for Q&A pipeline
153
+ st.session_state['qa_df'] = df
154
+
155
 
156
  with tab2:
157
  st.header("Question Answering Pipeline")
 
159
 
160
 
161
 
162
+ if 'qa_df' in st.session_state:
163
+ qa_df = st.session_state['qa_df']
164
+ context = ' '.join(qa_df['content'].tolist()) # Use predictions for Q&A
 
165
  st.write(f"Loaded {len(qa_df)} news excerpts")
166
 
167
  else: