Spaces:
Sleeping
Sleeping
gabrielaltay
commited on
Commit
•
a607798
1
Parent(s):
d531fb2
Update app.py
Browse filesmetadata -> billstatus_json
app.py
CHANGED
@@ -54,22 +54,22 @@ def show_bill(bdict):
|
|
54 |
bdict["legis_num"],
|
55 |
)
|
56 |
sponsor_url = get_sponsor_url(
|
57 |
-
bdict["
|
58 |
)
|
59 |
st.header("Metadata")
|
60 |
st.write("**Bill ID**: [{}]({})".format(bdict["legis_id"], bill_url))
|
61 |
-
st.write("**Sponsor**: [{}]({})".format(bdict["
|
62 |
-
st.write("**Title**: {}".format(bdict["
|
63 |
-
st.write("**Introduced**: {}".format(bdict["
|
64 |
-
st.write("**Policy Area**: {}".format(bdict["
|
65 |
-
st.write("**Subjects**: {}".format(bdict["
|
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["
|
71 |
-
st.write(bdict["
|
72 |
-
# st.markdown(bdict["
|
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 |
|