File size: 2,859 Bytes
1c97873
7920808
 
1c97873
 
 
 
913c773
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0f2c023
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
913c773
 
 
 
 
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
import streamlit as st
import requests

# Streamlit interface setup
st.title('Video Summary Interface')



# Creating tabs, 
tab1, tab2, tab3, tab4, tab5 = st.tabs(["Project Description", "Video Uploader", "Video Indexer", "Video Prompt", "Unique Value Add"])

with tab1:
    st.header("Project Description")
    st.write("Here you can describe the project in detail.")
    image_path = 'data/projectflow.png'

    # Display the image
    st.image(image_path, caption='Project Flow Diagram')
    # Add more components as needed

with tab2:
    st.header("Video Uploader")
    st.write("This tab can be used to display Scrum-related data and analytics.")
    # You can use things like st.dataframe(df) to show data

    image_path2 = 'data/quantumai.png'

    # Display the image
    st.image(image_path2, caption='Synthetic Data')
    # Add more components as needed
    # Create a link to an external URL
    url = "https://chat.openai.com/g/g-RjiG3D1mm-velocity-scrum-master"
    link_text = "Velocity Scrum Master"
    
    # Use Markdown to create the link
    st.markdown(f'[**{link_text}**]({url})')

with tab3:
    st.header("Video Indexer")
    st.write("Information and controls related to the Scrum TruEra Assistants API.")
    # Integration and API controls could be managed here

with tab4:
    st.header("Video Prompt")
    st.write("Information and controls related to the Scrum TruEra Assistants API.")

    # Input for modifying the prompt
    prompt = st.text_input("Enter your prompt:", 
                           "list the top 4 job interview mistakes and how to improve")
    
    # Slider to adjust the number in the prompt
    number = st.slider("Select the number of top mistakes:", min_value=1, max_value=10, value=4)
    
    # Update the prompt with the chosen number
    updated_prompt = prompt.replace("4", str(number))
    
    # Button to send the request
    if st.button("Summarize Video"):
        BASE_URL = "https://api.twelvelabs.io/v1.2"
        api_key = "tlk_3CPMVGM0ZPTKNT2TKQ3Y62TA7ZY9"
        data = {
            "video_id": "6636cf7fd1cd5a287c957cf5",
            "type": "summary",
            "prompt": updated_prompt
        }
    
        # Send the request
        response = requests.post(f"{BASE_URL}/summarize", json=data, headers={"x-api-key": api_key})
        
        # Check if the response is successful
        if response.status_code == 200:
            st.text_area("Summary:", response.json()['summary'], height=300)
        else:
            st.error("Failed to fetch summary: " + response.text)
    
    # Run this script using the following command:
    # streamlit run your_script_name.py
    
        

with tab5:
    st.header("Unique Value Add")
    st.write("Information and controls related to the Scrum TruEra Assistants API.")
    # Integration and API controls could be managed here