Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -106,8 +106,12 @@ def inference(file_name, _clear_punctuation_references, _clear_punctuation_predi
|
|
106 |
raise gr.Error("Please paste your JSON file.")
|
107 |
|
108 |
df = pl.read_ndjson(file_name)
|
109 |
-
|
110 |
df = df.drop_nulls()
|
|
|
|
|
|
|
|
|
111 |
|
112 |
required_columns = [
|
113 |
"filename",
|
|
|
106 |
raise gr.Error("Please paste your JSON file.")
|
107 |
|
108 |
df = pl.read_ndjson(file_name)
|
109 |
+
total_rows = len(df)
|
110 |
df = df.drop_nulls()
|
111 |
+
filtered_rows = len(df)
|
112 |
+
|
113 |
+
if total_rows != filtered_rows:
|
114 |
+
gr.Info(f"Total rows in the file: {total_rows}, but after dropping rows with NULL values there are: {filtered_rows} rows. Seems like a corrupted file.")
|
115 |
|
116 |
required_columns = [
|
117 |
"filename",
|