Commit
·
18c29c2
1
Parent(s):
0ecc614
update
Browse files
app.py
CHANGED
@@ -143,21 +143,11 @@ import re
|
|
143 |
def modify_plan_of_sqls_html(html_content):
|
144 |
soup = BeautifulSoup(html_content, 'html.parser')
|
145 |
|
146 |
-
# Remove the
|
147 |
-
final_table = soup.find('table', id=lambda x: x and x.startswith('step-'))
|
148 |
-
if final_table:
|
149 |
-
final_table.decompose()
|
150 |
-
|
151 |
-
# Remove the Prediction line
|
152 |
prediction_h3 = soup.find('h3', string=re.compile(r'Prediction:'))
|
153 |
if prediction_h3:
|
154 |
prediction_h3.decompose()
|
155 |
|
156 |
-
# Remove any extra <hr> tags at the end if present
|
157 |
-
last_hr = soup.find_all('hr')[-1]
|
158 |
-
if last_hr:
|
159 |
-
last_hr.decompose()
|
160 |
-
|
161 |
return str(soup)
|
162 |
|
163 |
|
|
|
143 |
def modify_plan_of_sqls_html(html_content):
|
144 |
soup = BeautifulSoup(html_content, 'html.parser')
|
145 |
|
146 |
+
# Remove only the Prediction line
|
|
|
|
|
|
|
|
|
|
|
147 |
prediction_h3 = soup.find('h3', string=re.compile(r'Prediction:'))
|
148 |
if prediction_h3:
|
149 |
prediction_h3.decompose()
|
150 |
|
|
|
|
|
|
|
|
|
|
|
151 |
return str(soup)
|
152 |
|
153 |
|