Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -142,8 +142,7 @@ with tab1:
|
|
| 142 |
mime='text/csv'
|
| 143 |
)
|
| 144 |
|
| 145 |
-
|
| 146 |
-
st.session_state['qa_df'] = df
|
| 147 |
|
| 148 |
|
| 149 |
with tab2:
|
|
@@ -152,10 +151,10 @@ with tab2:
|
|
| 152 |
|
| 153 |
|
| 154 |
|
| 155 |
-
if
|
| 156 |
-
|
| 157 |
-
context = ' '.join(
|
| 158 |
-
st.write(f"Loaded {len(
|
| 159 |
|
| 160 |
else:
|
| 161 |
st.warning("Please upload a CSV file.")
|
|
|
|
| 142 |
mime='text/csv'
|
| 143 |
)
|
| 144 |
|
| 145 |
+
|
|
|
|
| 146 |
|
| 147 |
|
| 148 |
with tab2:
|
|
|
|
| 151 |
|
| 152 |
|
| 153 |
|
| 154 |
+
if uploaded_file is not None:
|
| 155 |
+
|
| 156 |
+
context = ' '.join(df['content'].tolist()) # Use predictions for Q&A
|
| 157 |
+
st.write(f"Loaded {len(df)} news excerpts")
|
| 158 |
|
| 159 |
else:
|
| 160 |
st.warning("Please upload a CSV file.")
|