Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -152,6 +152,7 @@ with tab1:
|
|
| 152 |
st.warning("Please upload a CSV file to get started.")
|
| 153 |
else:
|
| 154 |
df = pd.read_csv(uploaded_file)
|
|
|
|
| 155 |
|
| 156 |
#Preview Uploaded Data
|
| 157 |
st.subheader("Preview Uploaded Data")
|
|
@@ -284,9 +285,11 @@ with tab2:
|
|
| 284 |
st.error("Please enter a question.")
|
| 285 |
|
| 286 |
#generate the answer based on selected news content using the given model
|
|
|
|
|
|
|
| 287 |
st.markdown("---")
|
| 288 |
st.header("Ask Questions Based on Your News Content")
|
| 289 |
-
context_1 = st.selectbox("Choose an article for the question:",
|
| 290 |
|
| 291 |
question_1 = st.text_input("Enter your question:", key="question_input")
|
| 292 |
if st.button("Get Answer", key="get_answer_1"):
|
|
|
|
| 152 |
st.warning("Please upload a CSV file to get started.")
|
| 153 |
else:
|
| 154 |
df = pd.read_csv(uploaded_file)
|
| 155 |
+
|
| 156 |
|
| 157 |
#Preview Uploaded Data
|
| 158 |
st.subheader("Preview Uploaded Data")
|
|
|
|
| 285 |
st.error("Please enter a question.")
|
| 286 |
|
| 287 |
#generate the answer based on selected news content using the given model
|
| 288 |
+
df1 = pd.read_csv(uploaded_file)
|
| 289 |
+
|
| 290 |
st.markdown("---")
|
| 291 |
st.header("Ask Questions Based on Your News Content")
|
| 292 |
+
context_1 = st.selectbox("Choose an article for the question:", df1['content'].tolist())
|
| 293 |
|
| 294 |
question_1 = st.text_input("Enter your question:", key="question_input")
|
| 295 |
if st.button("Get Answer", key="get_answer_1"):
|