Spaces:
Build error
Build error
Commit ·
7cd6a5a
1
Parent(s): 5539883
additional error handling for chunking and indeces
Browse files30 unmodified lines313233343536373839404142434 unmodified lines48495051525330 unmodified linesst.write(f"Type of coordinates[0]: {type(coordinates[0])}") # Debugging linest.write(f"Value of coordinates[0]: {coordinates[0]}") # Debugging lineif len(coordinates) == 1:row, col = coordinates[0]answers.append(chunk.iloc[row, col])else:cell_values = []for coordinate in coordinates:row, col = coordinatecell_values.append(chunk.iloc[row, col])answers.append(", ".join(map(str, cell_values)))return answers4 unmodified linesMAX_ROWS_PER_CHUNK = 200def summarize_map_reduce(data, questions):30 unmodified lines31323334353637383940414243444546474 unmodified lines5253545556575830 unmodified linesst.write(f"Type of coordinates[0]: {type(coordinates[0])}") # Debugging linest.write(f"Value of coordinates[0]: {coordinates[0]}") # Debugging linest.write(f"DataFrame shape: {chunk.shape}") # Debugging lineif len(coordinates) == 1:row, col = coordinates[0]st.write(f"Trying to access row {row}, col {col}") # Debugging lineanswers.append(chunk.iloc[row, col])else:cell_values = []for coordinate in coordinates:row, col = coordinatest.write(f"Trying to access row {row}, col {col}") # Debugging linecell_values.append(chunk.iloc[row, col])answers.append(", ".join(map(str, cell_values)))return answers4 unmodified linesMAX_ROWS_PER_CHUNK = 200def summarize_map_reduce(data, questions):
app.py+5