import streamlit as st
st.set_page_config (page_icon="icon.jpg",page_title="Content Moderation",layout="centered")
# content_type=st.selectbox("Content Type",["Text","Image","Video"])
st.markdown("
Content Moderation
",
unsafe_allow_html=True)
c1,c2=st.columns(2)
with c1 :
content_type=st.selectbox("Content Type",["Text","Image","Video"])
input=st.text_area(":blue[My text here :]",height=500)
if "Video" in content_type:
def generate_text(project_id: str, location: str) -> str:
# Initialize Vertex AI
# vertexai.init(project=project_id, location=location)
# Load the model
# vision_model = GenerativeModel("gemini-pro-vision")
# Generate text
response = vision_model.generate_content(
[
Part.from_uri(
"gs://cloud-samples-data/video/animals.mp4", mime_type="video/mp4"
),
"What is in the video?",
]
)
print(response)
return response.text