Spaces:
Sleeping
Sleeping
Update influencer_ui.py
Browse files- influencer_ui.py +13 -13
influencer_ui.py
CHANGED
|
@@ -17,11 +17,18 @@ influencers_data = {
|
|
| 17 |
# Add more influencers as needed
|
| 18 |
}
|
| 19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
def show_influencer_search_page():
|
| 22 |
st.header("Influencer Search and Analysis")
|
| 23 |
st.markdown("Discover influencers by name, niche, location, follower count, and more.")
|
| 24 |
search_query = st.text_input("Search Influencers", "")
|
|
|
|
| 25 |
|
| 26 |
# Advanced Filters (placeholder functionality)
|
| 27 |
st.markdown("### Advanced Filters")
|
|
@@ -56,18 +63,11 @@ def show_influencer_search_page():
|
|
| 56 |
|
| 57 |
with col2:
|
| 58 |
# Create a button with the influencer's name
|
|
|
|
| 59 |
if st.button(influencer_info["name"], key=influencer_id):
|
| 60 |
-
|
| 61 |
-
st.subheader(influencer_info["name"])
|
| 62 |
-
st.write(influencer_info["details"])
|
| 63 |
-
|
| 64 |
-
|
| 65 |
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
if comparison:
|
| 71 |
-
st.write("Comparison View of Selected Influencers")
|
| 72 |
-
# Placeholder for comparison view
|
| 73 |
-
st.write("Comparative Data Display...")
|
|
|
|
| 17 |
# Add more influencers as needed
|
| 18 |
}
|
| 19 |
|
| 20 |
+
# Function to display influencer details
|
| 21 |
+
def display_influencer_details(influencer_info):
|
| 22 |
+
st.subheader(influencer_info["name"])
|
| 23 |
+
st.image(influencer_info["image"], width=200)
|
| 24 |
+
st.write(influencer_info["details"])
|
| 25 |
+
|
| 26 |
|
| 27 |
def show_influencer_search_page():
|
| 28 |
st.header("Influencer Search and Analysis")
|
| 29 |
st.markdown("Discover influencers by name, niche, location, follower count, and more.")
|
| 30 |
search_query = st.text_input("Search Influencers", "")
|
| 31 |
+
|
| 32 |
|
| 33 |
# Advanced Filters (placeholder functionality)
|
| 34 |
st.markdown("### Advanced Filters")
|
|
|
|
| 63 |
|
| 64 |
with col2:
|
| 65 |
# Create a button with the influencer's name
|
| 66 |
+
# Button to select an influencer
|
| 67 |
if st.button(influencer_info["name"], key=influencer_id):
|
| 68 |
+
st.session_state.selected_influencer = influencer_id
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
|
| 70 |
+
# Display the details of the selected influencer
|
| 71 |
+
if st.session_state.selected_influencer:
|
| 72 |
+
display_influencer_details(influencers_data[st.session_state.selected_influencer])
|
| 73 |
+
|
|
|
|
|
|
|
|
|
|
|
|