-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
33 lines (26 loc) · 963 Bytes
/
app.py
File metadata and controls
33 lines (26 loc) · 963 Bytes
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
import streamlit as st
import google.generativeai as genai
# Configure Gemini API
def configure_gemini():
genai.configure(api_key=st.secrets["GEMINI_API_KEY"])
# Set up the navigation
def main():
# Configure the page
st.set_page_config(
page_title="AgroHealth Analyzer",
page_icon="🌿",
layout="wide"
)
# Configure Gemini API
configure_gemini()
# Define pages
home_page = st.Page("home.py", title="Home", icon="🏠")
app_page = st.Page("disease_detection.py", title="Disease Detection", icon="⚙️")
about_page = st.Page("about.py", title="About", icon="ℹ️")
download_page = st.Page("download.py", title="Download", icon="⬇️")
# Set up navigation
page = st.navigation({"Navigation" :[home_page, app_page, about_page, download_page]}, position="sidebar", expanded=False)
# Run the selected page
page.run()
if __name__ == "__main__":
main()