ai-lover commited on
Commit
01dce02
·
verified ·
1 Parent(s): a1b3df3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -36,6 +36,10 @@ def generate_insights(df):
36
 
37
  return insights
38
 
 
 
 
 
39
  # RAG setup using Hugging Face summarization
40
  def generate_query_summary(df, query):
41
  summarizer = pipeline("summarization")
 
36
 
37
  return insights
38
 
39
+ if df.empty:
40
+ st.error("The uploaded dataset is empty. Please upload a valid dataset.")
41
+ st.stop()
42
+
43
  # RAG setup using Hugging Face summarization
44
  def generate_query_summary(df, query):
45
  summarizer = pipeline("summarization")