File size: 1,439 Bytes
839506d
 
 
1562cbd
 
 
 
 
 
 
 
839506d
 
1562cbd
8ad1ac1
1562cbd
839506d
065d2d7
 
90f1bbe
839506d
1562cbd
 
 
 
 
 
90f1bbe
 
839506d
 
1562cbd
839506d
 
 
1562cbd
839506d
1562cbd
90f1bbe
 
 
1562cbd
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import streamlit as st
import importlib

# Define your app modules with icons and images
APPS = [
    {"name": "Chat", "module": "chatgskd", "image": "chatgskd.png"},
    {"name": "Google", "module": "google", "image": "google.png"},
    {"name": "Wikipedia", "module": "wikipedia", "image": "wikipedia.png"},
    {"name": "News", "module": "news", "image": "news.png"},
    {"name": "YouTube", "module": "youtube", "image": "youtube.png"},
]

# Streamlit UI
st.set_page_config(page_title="Multimodal Query Processing & Knowledge Retrieval System", layout="wide")
st.title("Multimodal Query Processing & Knowledge Retrieval System")
st.subheader("Developed by Gskd")

# Display apps in a 2x3 grid
cols = st.columns(3)
selected_app = None

for i, app in enumerate(APPS):
    col = cols[i % 3]
    with col:
        st.image(app["image"], width=100)
        if st.button(app["name"], key=app["name"]):
            selected_app = app["module"]

# Load and run the selected app
if selected_app:
    try:
        app_module = importlib.import_module(selected_app)
        if hasattr(app_module, "main"):
            app_module.main()
        else:
            st.error(f"{selected_app}.py must have a `main()` function.")
    except ModuleNotFoundError:
        st.error(f"Module {selected_app} not found. Make sure {selected_app}.py exists.")

# Footer
st.markdown("---")
st.markdown("© 2025 Gskd and our team members. All rights reserved.")