gabrielaltay commited on
Commit
a607798
1 Parent(s): d531fb2

Update app.py

Browse files

metadata -> billstatus_json

Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -54,22 +54,22 @@ def show_bill(bdict):
54
  bdict["legis_num"],
55
  )
56
  sponsor_url = get_sponsor_url(
57
- bdict["metadata"]["sponsors"][0]["bioguide_id"]
58
  )
59
  st.header("Metadata")
60
  st.write("**Bill ID**: [{}]({})".format(bdict["legis_id"], bill_url))
61
- st.write("**Sponsor**: [{}]({})".format(bdict["metadata"]["sponsors"][0]["full_name"], sponsor_url))
62
- st.write("**Title**: {}".format(bdict["metadata"]["title"]))
63
- st.write("**Introduced**: {}".format(bdict["metadata"]["introduced_date"]))
64
- st.write("**Policy Area**: {}".format(bdict["metadata"]["policy_area"]))
65
- st.write("**Subjects**: {}".format(bdict["metadata"]["subjects"]))
66
  st.write("**Character Count**: {}".format(len(bdict["text"])))
67
  st.write("**Estimated Tokens**: {}".format(len(bdict["text"])/4))
68
 
69
  st.header("Summary")
70
- if len(bdict["metadata"]["summaries"]) > 0:
71
- st.write(bdict["metadata"]["summaries"][0])
72
- # st.markdown(bdict["metadata"]["summaries"][0]["text"], unsafe_allow_html=True)
73
  else:
74
  st.write("Not Available")
75
 
 
54
  bdict["legis_num"],
55
  )
56
  sponsor_url = get_sponsor_url(
57
+ bdict["billstatus_json"]["sponsors"][0]["bioguide_id"]
58
  )
59
  st.header("Metadata")
60
  st.write("**Bill ID**: [{}]({})".format(bdict["legis_id"], bill_url))
61
+ st.write("**Sponsor**: [{}]({})".format(bdict["billstatus_json"]["sponsors"][0]["full_name"], sponsor_url))
62
+ st.write("**Title**: {}".format(bdict["billstatus_json"]["title"]))
63
+ st.write("**Introduced**: {}".format(bdict["billstatus_json"]["introduced_date"]))
64
+ st.write("**Policy Area**: {}".format(bdict["billstatus_json"]["policy_area"]))
65
+ st.write("**Subjects**: {}".format(bdict["billstatus_json"]["subjects"]))
66
  st.write("**Character Count**: {}".format(len(bdict["text"])))
67
  st.write("**Estimated Tokens**: {}".format(len(bdict["text"])/4))
68
 
69
  st.header("Summary")
70
+ if len(bdict["billstatus_json"]["summaries"]) > 0:
71
+ st.write(bdict["billstatus_json"]["summaries"][0])
72
+ # st.markdown(bdict["billstatus_json"]["summaries"][0]["text"], unsafe_allow_html=True)
73
  else:
74
  st.write("Not Available")
75