File size: 754 Bytes
4962362
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import streamlit as st


def display_user_info(user_data):
    """Displays user information retrieved from GitHub API."""
    if not user_data:
        return

    st.title("**User Info:**")

    st.write(f"**Name:** {user_data['name']}")
    st.write(f"**Username:** {user_data['login']}")

    st.write("**User Image:**")
    st.image(user_data["avatar_url"], width=100)

    bio = user_data.get("bio", "N/A")
    location = user_data.get("location", "N/A")
    st.write(f"**Bio:** {bio}")
    st.write(f"**Location:** {location}")

    st.write("---")  # Separator

    st.metric("Repositories", user_data["public_repos"])
    st.metric("Followers", user_data["followers"])
    st.metric("Following", user_data["following"])