Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,7 +7,7 @@ import os
|
|
| 7 |
# Backend Variables
|
| 8 |
# ----------------------------------------
|
| 9 |
API_KEY = os.getenv("FMP_API_KEY")
|
| 10 |
-
DEFAULT_RSS_PAGE =
|
| 11 |
DEFAULT_SEARCH_NAME = "NJOY"
|
| 12 |
DEFAULT_CIK = "0001547416"
|
| 13 |
|
|
@@ -99,19 +99,13 @@ def main():
|
|
| 99 |
help="Pick a live feed, do a search by name, or view offerings by CIK."
|
| 100 |
)
|
| 101 |
if page == "Equity Offering Live Feed":
|
| 102 |
-
|
| 103 |
-
"Live Feed Page",
|
| 104 |
-
min_value=0,
|
| 105 |
-
value=DEFAULT_RSS_PAGE,
|
| 106 |
-
help="Pick which page of the live feed to show."
|
| 107 |
-
)
|
| 108 |
-
st.session_state.rss_page = rss_page
|
| 109 |
if st.button("Run"):
|
| 110 |
st.session_state.run_rss = True
|
| 111 |
elif page == "Equity Offering Search":
|
| 112 |
search_name = st.text_input(
|
| 113 |
"Search Name",
|
| 114 |
-
value=
|
| 115 |
help="Enter a name to search for equity offerings."
|
| 116 |
)
|
| 117 |
st.session_state.search_name = search_name
|
|
@@ -120,7 +114,7 @@ def main():
|
|
| 120 |
else: # Equity Offering By CIK
|
| 121 |
cik_value = st.text_input(
|
| 122 |
"Company CIK",
|
| 123 |
-
value=
|
| 124 |
help="Enter a company's CIK to view its equity offerings."
|
| 125 |
)
|
| 126 |
st.session_state.cik_value = cik_value
|
|
@@ -143,7 +137,7 @@ def main():
|
|
| 143 |
else:
|
| 144 |
st.dataframe(df_rss, use_container_width=True)
|
| 145 |
else:
|
| 146 |
-
st.info("
|
| 147 |
|
| 148 |
elif page == "Equity Offering Search":
|
| 149 |
st.header("Equity Offering Search")
|
|
|
|
| 7 |
# Backend Variables
|
| 8 |
# ----------------------------------------
|
| 9 |
API_KEY = os.getenv("FMP_API_KEY")
|
| 10 |
+
DEFAULT_RSS_PAGE = 5 # Fixed at 5, not exposed to the user
|
| 11 |
DEFAULT_SEARCH_NAME = "NJOY"
|
| 12 |
DEFAULT_CIK = "0001547416"
|
| 13 |
|
|
|
|
| 99 |
help="Pick a live feed, do a search by name, or view offerings by CIK."
|
| 100 |
)
|
| 101 |
if page == "Equity Offering Live Feed":
|
| 102 |
+
# Removed the user input for the page; using the fixed default of 5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 103 |
if st.button("Run"):
|
| 104 |
st.session_state.run_rss = True
|
| 105 |
elif page == "Equity Offering Search":
|
| 106 |
search_name = st.text_input(
|
| 107 |
"Search Name",
|
| 108 |
+
value=st.session_state.search_name,
|
| 109 |
help="Enter a name to search for equity offerings."
|
| 110 |
)
|
| 111 |
st.session_state.search_name = search_name
|
|
|
|
| 114 |
else: # Equity Offering By CIK
|
| 115 |
cik_value = st.text_input(
|
| 116 |
"Company CIK",
|
| 117 |
+
value=st.session_state.cik_value,
|
| 118 |
help="Enter a company's CIK to view its equity offerings."
|
| 119 |
)
|
| 120 |
st.session_state.cik_value = cik_value
|
|
|
|
| 137 |
else:
|
| 138 |
st.dataframe(df_rss, use_container_width=True)
|
| 139 |
else:
|
| 140 |
+
st.info("Click 'Run' to fetch the live feed.")
|
| 141 |
|
| 142 |
elif page == "Equity Offering Search":
|
| 143 |
st.header("Equity Offering Search")
|