Spaces:
Sleeping
Sleeping
File size: 720 Bytes
7a9577c 63fd708 7a9577c 63fd708 7a9577c 63fd708 7a9577c 63fd708 7a9577c 63fd708 7a9577c 63fd708 7a9577c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
import streamlit as st
import json
# Load the data from the JSON file
with open('data.json', 'r') as f:
data = json.load(f)
def display_brand_info(parent_company):
brand_info = ''
for brand_id, brand in data['brands'].items():
if parent_company.lower() in brand['description'].lower():
brand_info += f"# {brand['name']}\n{brand['description']}\n---\n"
return brand_info
def main():
st.set_page_config(page_title="Brand Information")
st.title("Brand Information")
parent_company = st.text_input("Enter Parent Company")
if parent_company:
brand_info = display_brand_info(parent_company)
st.markdown(brand_info)
if __name__ == "__main__":
main() |