Prageeth-1 commited on
Commit
9d80340
·
verified ·
1 Parent(s): 2c09abc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -285,8 +285,12 @@ with tab2:
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())
 
285
  st.error("Please enter a question.")
286
 
287
  #generate the answer based on selected news content using the given model
 
288
 
289
+ if uploaded_file is None:
290
+ pass
291
+ else:
292
+ df1 = pd.read_csv(uploaded_file
293
+
294
  st.markdown("---")
295
  st.header("Ask Questions Based on Your News Content")
296
  context_1 = st.selectbox("Choose an article for the question:", df1['content'].tolist())