jonathanjordan21 commited on
Commit
7ebb52f
·
verified ·
1 Parent(s): 63dc565

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -2
app.py CHANGED
@@ -21,7 +21,7 @@ def visualize(url):
21
  with st.spinner("loading website data ..."):
22
  # innerHTML = get_innerHTML(url)
23
  # html_image, html_content = take_webdata(url)
24
- html_image, html_content = get_vehicle_info(url)
25
  st.subheader("Website title:")
26
  if html_content:
27
  st.info(html_content)
@@ -32,7 +32,18 @@ def visualize(url):
32
  st.image(html_image)
33
  else:
34
  st.error("Error: empty html preview")
35
-
 
 
 
 
 
 
 
 
 
 
 
36
 
37
  except Exception as e:
38
  st.error(f"Error: {e}")
 
21
  with st.spinner("loading website data ..."):
22
  # innerHTML = get_innerHTML(url)
23
  # html_image, html_content = take_webdata(url)
24
+ html_image, html_content, data = get_vehicle_info(url)
25
  st.subheader("Website title:")
26
  if html_content:
27
  st.info(html_content)
 
32
  st.image(html_image)
33
  else:
34
  st.error("Error: empty html preview")
35
+
36
+ data_kendaraan, total_tagihan, rincians_pkb, rincians_swd = data
37
+
38
+ st.json(
39
+ {
40
+ "data_kendaraan":data_kendaraan,
41
+ "total_tagihan":total_tagihan,
42
+ "rincian_pkb":[x for x in rincians_pkb if any(x.values())],
43
+ "rincian_swd":[x for x in rincians_swd if any(x.values())]
44
+ }
45
+ )
46
+
47
 
48
  except Exception as e:
49
  st.error(f"Error: {e}")