Update app.py
Browse files
app.py
CHANGED
@@ -30,7 +30,10 @@ def save_csv_as_excel(text):
|
|
30 |
st.dataframe(df)
|
31 |
except pd.errors.EmptyDataError:
|
32 |
st.error("The pasted text does not contain valid CSV data.")
|
33 |
-
|
|
|
|
|
|
|
34 |
def split_sentences(text):
|
35 |
sentences = sent_tokenize(text)
|
36 |
return "\n".join(sentences)
|
|
|
30 |
st.dataframe(df)
|
31 |
except pd.errors.EmptyDataError:
|
32 |
st.error("The pasted text does not contain valid CSV data.")
|
33 |
+
except pd.errors.ParserError as e:
|
34 |
+
st.error(f"Error parsing CSV data: {str(e)}")
|
35 |
+
st.info("Please ensure that the pasted text is in a valid CSV format.")
|
36 |
+
|
37 |
def split_sentences(text):
|
38 |
sentences = sent_tokenize(text)
|
39 |
return "\n".join(sentences)
|