File size: 1,192 Bytes
d083627
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import streamlit as st
from utils import get_queue_status
from config import MAX_CONCURRENT_JOBS

def render_sidebar():
    with st.sidebar:
        st.header("⚙️ API Configuration")
        st.info(
            "API keys are optional and only required for AI features "
            "like **Auto-Emoji** or **AI Tagger**."
        )
        st.radio("Select API Key Type", ("OpenAI API"), key="api_key_type")
        st.text_input("Enter your API Key", type="password", key="api_key_input")
        
        st.markdown("---")
        
        st.header("📊 Job Status")
        active_jobs = get_queue_status()
        st.metric(
            label="Concurrent Jobs Running",
            value=f"{active_jobs} / {MAX_CONCURRENT_JOBS}"
        )

        st.markdown("---")

        st.header("About Pycaps")
        st.markdown(
            "**Pycaps** is an open-source tool for adding stylish, "
            "animated subtitles to videos."
        )
        st.markdown(
            "[⭐ Star on GitHub](https://github.com/francozanardi/pycaps)"
        )
        st.markdown(
            "[📄 Read the Docs](https://github.com/francozanardi/pycaps/blob/main/README.md)"
        )