kambris commited on
Commit
dbeb679
·
verified ·
1 Parent(s): ba9c9db

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -4
app.py CHANGED
@@ -74,10 +74,14 @@ def analyze_csv(df_hash):
74
  for line_idx, row in df.iterrows():
75
  line_words = []
76
 
77
- # Process each value in the row (each comma-separated word)
78
- for col_idx, cell_value in enumerate(row):
79
- if pd.notna(cell_value) and str(cell_value).strip():
80
- word, chars = parse_voynich_word(str(cell_value))
 
 
 
 
81
  if word and chars:
82
  words.append(word)
83
  chars_list.append(chars)
 
74
  for line_idx, row in df.iterrows():
75
  line_words = []
76
 
77
+ # Get the entire row as a single string and split by commas
78
+ row_text = ','.join(str(val) for val in row if pd.notna(val))
79
+ word_strings = row_text.split(',')
80
+
81
+ # Process each word in the line
82
+ for col_idx, word_str in enumerate(word_strings):
83
+ if word_str.strip():
84
+ word, chars = parse_voynich_word(word_str)
85
  if word and chars:
86
  words.append(word)
87
  chars_list.append(chars)