generative_AI / app.py
alok94's picture
adding project
561acc5
raw
history blame
930 Bytes
import streamlit as st
import replicate
from src.page1 import page1
from src.page2 import page2
from src.page3 import page3
from src.page4 import page4
from src.page5 import page5
from src.page6 import page6
from src.page7 import page7
from src.page8 import page8
# import openai
import os
from dotenv import load_dotenv
load_dotenv()
REPLICATE_API_TOKEN = os.environ.get("REPLICATE_API_TOKEN")
replicate = replicate.Client(api_token=REPLICATE_API_TOKEN)
st.set_page_config(layout="wide")
# openai.api_key = os.getenv("OPENAI_API_KEY")
pages = {
# "Entry point": page1,
# "Text to image": page2,
# "Image variation": page3,
# "Image edit": page4,
"Text to Image":page5,
"Image to Text": page6,
"Image to Video":page7,
"Text to Video": page8
}
# Create the selectbox in the sidebar
page = st.sidebar.selectbox("Select a page", list(pages.keys()))
# Display the selected page
pages[page]()