Spaces:
Running
Running
deveix
commited on
Commit
·
46710a4
1
Parent(s):
c883d77
fix dataframe
Browse files- app/main.py +3 -5
app/main.py
CHANGED
@@ -139,15 +139,13 @@ def get_text_by_block_number(filepath, block_numbers):
|
|
139 |
splitted = block.split('\n')
|
140 |
ayah = splitted[0]
|
141 |
tafsir = splitted[1]
|
|
|
|
|
142 |
# Replace single newlines within blocks with space and strip leading/trailing whitespace
|
143 |
# ayah_info = await get_ayah_info(ayah) # This makes the API call
|
144 |
-
row_data = df.iloc[block_number].to_dict()
|
145 |
-
print(row_data)
|
146 |
|
147 |
blocks_text.append({
|
148 |
-
# "ayah": ayah.replace(" ", ''),
|
149 |
-
# "tafsir": tafsir,
|
150 |
-
# "ayah": ayah.replace(" ", ''),
|
151 |
"tafsir": tafsir,
|
152 |
**row_data
|
153 |
})
|
|
|
139 |
splitted = block.split('\n')
|
140 |
ayah = splitted[0]
|
141 |
tafsir = splitted[1]
|
142 |
+
print(block_number-1)
|
143 |
+
print(df.iloc[block_number - 1])
|
144 |
# Replace single newlines within blocks with space and strip leading/trailing whitespace
|
145 |
# ayah_info = await get_ayah_info(ayah) # This makes the API call
|
146 |
+
row_data = df.iloc[block_number - 1].to_dict()
|
|
|
147 |
|
148 |
blocks_text.append({
|
|
|
|
|
|
|
149 |
"tafsir": tafsir,
|
150 |
**row_data
|
151 |
})
|