Yehor commited on
Commit
cc886a6
·
verified ·
1 Parent(s): 6457115

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
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",