sree4411 commited on
Commit
e64adca
·
verified ·
1 Parent(s): bcdac87

Update pages/3_Life Cycle Of ML Project.py

Browse files
Files changed (1) hide show
  1. pages/3_Life Cycle Of ML Project.py +45 -0
pages/3_Life Cycle Of ML Project.py CHANGED
@@ -238,6 +238,9 @@ elif st.session_state.page == "semi_structured_data":
238
  if st.button(":blue[JSON Data]"):
239
  st.session_state.page = "json"
240
 
 
 
 
241
  if st.button(":red[Back to Data Collection]"):
242
  st.session_state.page = "data_collection"
243
 
@@ -272,6 +275,8 @@ except FileNotFoundError:
272
  print("File not found. Check the file path.")
273
  """, language='python')
274
 
 
 
275
  if st.button(":red[Back to Semi-Structured Data]"):
276
  st.session_state.page = "semi_structured_data"
277
 
@@ -307,5 +312,45 @@ except FileNotFoundError:
307
  print("File not found. Check the file path.")
308
  """, language='python')
309
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
310
  if st.button(":red[Back to Semi-Structured Data]"):
311
  st.session_state.page = "semi_structured_data"
 
238
  if st.button(":blue[JSON Data]"):
239
  st.session_state.page = "json"
240
 
241
+ if st.button(":blue[HTML Data]"):
242
+ st.session_state.page = "html"
243
+
244
  if st.button(":red[Back to Data Collection]"):
245
  st.session_state.page = "data_collection"
246
 
 
275
  print("File not found. Check the file path.")
276
  """, language='python')
277
 
278
+ st.link_button(":blue[Open XML Documentation](https://www.w3.org/XML/)")
279
+
280
  if st.button(":red[Back to Semi-Structured Data]"):
281
  st.session_state.page = "semi_structured_data"
282
 
 
312
  print("File not found. Check the file path.")
313
  """, language='python')
314
 
315
+ st.link_button(":blue[Open JSON Documentation](https://www.json.org/)")
316
+
317
+ if st.button(":red[Back to Semi-Structured Data]"):
318
+ st.session_state.page = "semi_structured_data"
319
+
320
+ # ----------------- HTML Data Page -----------------
321
+ elif st.session_state.page == "html":
322
+ st.title(":blue[HTML Data Format]")
323
+ st.write("""
324
+ HTML (HyperText Markup Language) is the standard language for creating webpages. It uses a markup structure to format text, images, and other content on the web.
325
+ """)
326
+
327
+ st.markdown("### Example: Reading HTML data")
328
+ st.code("""
329
+ import pandas as pd
330
+
331
+ # Reading HTML data
332
+ dfs = pd.read_html('sample.html')
333
+ print(dfs[0]) # Display the first table from the HTML file
334
+ """, language='python')
335
+
336
+ st.write("### Issues Encountered")
337
+ st.write("""
338
+ - *File not found*: Incorrect file path.
339
+ - *Missing Libraries*: pandas might be missing.
340
+ """)
341
+
342
+ st.write("### Solutions to These Issues")
343
+ st.code("""
344
+ # Install required libraries
345
+ # pip install pandas
346
+ # Handle file not found
347
+ try:
348
+ dfs = pd.read_html('sample.html')
349
+ except FileNotFoundError:
350
+ print("File not found. Check the file path.")
351
+ """, language='python')
352
+
353
+ st.link_button(":blue[Open HTML Documentation](https://developer.mozilla.org/en-US/docs/Web/HTML)")
354
+
355
  if st.button(":red[Back to Semi-Structured Data]"):
356
  st.session_state.page = "semi_structured_data"