gkdivya commited on
Commit
82be1ff
·
1 Parent(s): f137c19

Update influencer_ui.py

Browse files
Files changed (1) hide show
  1. influencer_ui.py +39 -2
influencer_ui.py CHANGED
@@ -1,5 +1,25 @@
1
  import streamlit as st
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  def show_influencer_search_page():
4
  st.header("Influencer Search and Analysis")
5
  st.markdown("Discover influencers by name, niche, location, follower count, and more.")
@@ -23,8 +43,25 @@ def show_influencer_search_page():
23
  st.write("Influencer 1 - Profile Overview...")
24
  st.write("Influencer 2 - Profile Overview...")
25
  else:
26
- st.write("Enter a search term to see results.")
27
- search_concept = st.text_input("search term", "")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
 
29
  # Comparison Tool (conceptual)
30
  st.markdown("### Influencer Comparison Tool")
 
1
  import streamlit as st
2
 
3
+ influencers_data = {
4
+ "influencer1": {
5
+ "name": "Influencer One",
6
+ "image": "images/inf1.jpg", # Replace with actual image paths
7
+ "details": "Details about Influencer One..."
8
+ },
9
+ "influencer2": {
10
+ "name": "Influencer Two",
11
+ "image": "images/inf2.jpg",
12
+ "details": "Details about Influencer Two..."
13
+ }
14
+ # Add more influencers as needed
15
+ }
16
+
17
+ def load_influencer_data():
18
+ # This function would load influencer data from a JSON file
19
+ # For this example, we are using a dummy dictionary
20
+ return influencers_data
21
+
22
+
23
  def show_influencer_search_page():
24
  st.header("Influencer Search and Analysis")
25
  st.markdown("Discover influencers by name, niche, location, follower count, and more.")
 
43
  st.write("Influencer 1 - Profile Overview...")
44
  st.write("Influencer 2 - Profile Overview...")
45
  else:
46
+ search_concept = st.text_input("Enter a search term to see results:", "")\
47
+ search_button = st.button("Search")
48
+
49
+ if search_button:
50
+ # Load influencer data (from JSON or dictionary)
51
+ data = load_influencer_data()
52
+
53
+ # Display influencer images as clickable buttons
54
+ for influencer_id, influencer_info in data.items():
55
+ col1, col2 = st.columns([1, 3])
56
+ with col1:
57
+ if st.button("", key=influencer_id):
58
+ # When an image is clicked, show details
59
+ st.image(influencer_info["image"], width=100)
60
+ with col2:
61
+ st.subheader(influencer_info["name"])
62
+ st.write(influencer_info["details"])
63
+
64
+
65
 
66
  # Comparison Tool (conceptual)
67
  st.markdown("### Influencer Comparison Tool")