Spaces:
Sleeping
Sleeping
Update influencer_ui.py
Browse files- influencer_ui.py +10 -0
influencer_ui.py
CHANGED
|
@@ -2,7 +2,11 @@ import streamlit as st
|
|
| 2 |
from PIL import Image
|
| 3 |
import requests
|
| 4 |
from io import BytesIO
|
|
|
|
| 5 |
|
|
|
|
|
|
|
|
|
|
| 6 |
influencers_data = {
|
| 7 |
"influencer1": {
|
| 8 |
"name": "Influencer One",
|
|
@@ -28,6 +32,12 @@ def show_influencer_search_page():
|
|
| 28 |
search_button = st.button("Search Influencers")
|
| 29 |
|
| 30 |
if search_button:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
# Display influencer images as clickable buttons
|
| 32 |
for influencer_id, influencer_info in influencers_data.items():
|
| 33 |
col1, col2 = st.columns([1, 3])
|
|
|
|
| 2 |
from PIL import Image
|
| 3 |
import requests
|
| 4 |
from io import BytesIO
|
| 5 |
+
import json
|
| 6 |
|
| 7 |
+
|
| 8 |
+
profile_default_image_url = "https://t4.ftcdn.net/jpg/03/46/93/61/360_F_346936114_RaxE6OQogebgAWTalE1myseY1Hbb5qPM.jpg"
|
| 9 |
+
insta_rag_url = "https://us-central1-steam-cache-277314.cloudfunctions.net/gemini-hackathon-insta-influencer"
|
| 10 |
influencers_data = {
|
| 11 |
"influencer1": {
|
| 12 |
"name": "Influencer One",
|
|
|
|
| 32 |
search_button = st.button("Search Influencers")
|
| 33 |
|
| 34 |
if search_button:
|
| 35 |
+
st.write(search_query)
|
| 36 |
+
data = {"search_query": search_query}
|
| 37 |
+
resp = requests.post(insta_rag_url, json=data)
|
| 38 |
+
response_dict = json.loads(resp.text)
|
| 39 |
+
st.write(response_dict)
|
| 40 |
+
|
| 41 |
# Display influencer images as clickable buttons
|
| 42 |
for influencer_id, influencer_info in influencers_data.items():
|
| 43 |
col1, col2 = st.columns([1, 3])
|